This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

How to get rid of /index.php/ URLs

Discussion around this tutorial for symfony 1.0.x

How to get rid of /index.php/ URLs

by tm1978 » Fri Mar 20, 2009 12:25 pm

Hello again!

Well, the mod_rewrite as such is working.

This means I can both go to:

/index.php/something

and

/something.

However the links that are generated are going to:

/index.php/something which does not look very pretty.

I have looked in the templates and there is no reference to this - a method generates the links.

How can you tell this Symfony method to generate straight links without the /index.php/ in between?

Somehow it looks like a Symfony issue and not a .htaccess issue as the source code in the HTML also contains /index.php/ urls...


Thanks!


:P
tm1978
Junior Member
 
Posts: 24
Joined: Wed Mar 18, 2009 11:54 am

Re: How to get rid of /index.php/ URLs

by michael.piecko » Fri Mar 20, 2009 1:15 pm

michael.piecko
Faithful Member
 
Posts: 624
Joined: Fri Jun 30, 2006 5:56 pm
Location: Germany

Re: How to get rid of /index.php/ URLs

by tm1978 » Fri Mar 20, 2009 2:51 pm

Yes, I have read this and changed in /apps/frontend/config/settings.yml

no_script_name: on
tm1978
Junior Member
 
Posts: 24
Joined: Wed Mar 18, 2009 11:54 am

Re: How to get rid of /index.php/ URLs

by michael.piecko » Fri Mar 20, 2009 2:51 pm

And if you clear your cache this should work.

Michael
michael.piecko
Faithful Member
 
Posts: 624
Joined: Fri Jun 30, 2006 5:56 pm
Location: Germany

Re: How to get rid of /index.php/ URLs

by tm1978 » Fri Mar 20, 2009 3:52 pm

Which directory has higher prioroty?

/config/settings.yml

or apps/frontend/config/settings.yml ?

Where should those files be edited?

And you always execute symfony clear-cache on every change then?

I have deleted the directory:

cache/frontend/prod and it worked afterwards :)~ :-)~ :smile:

Thanks!
tm1978
Junior Member
 
Posts: 24
Joined: Wed Mar 18, 2009 11:54 am

Re: How to get rid of /index.php/ URLs

by joshcoady » Fri Mar 20, 2009 10:48 pm

You need to clear the symfony cache every time you change a config file or add a new class.

/apps/*/config/ will override settings in /config/
joshcoady
Member
 
Posts: 52
Joined: Mon Jun 30, 2008 7:00 am
Location: Rohnert Park, CA