View Full Version : Please Help - index.php workaround?

02-24-2008, 07:51 PM
I just had a site developed with Expression Engine as the CMS. My Web developer has created URLs for my site that look like: http://www.url.com/index.php?/subdirectory
which I find rather awkward. I asked my Web developer if I could have these URLs changed to http://www.url.com/subdirectory instead, and I was told:

Regarding having the "index.php" in the middle, this is always a thorn, and the workarounds do not work consistently from server to server. (It's usually done through mod_rewrite through .htaccess file, but it's not 100% reliable.)

I think this is perfectly doable and perhaps my Web developer is being lazy, but I wanted to run this by you guys to see what you think. I know virtually nothing about PHP, but I have had other PHP sites developed before with customized CMSs and was never given an excuse like this. Is my Web developer full of it? Is there something I should suggest for the Web developer to do to change this? I want URLs that are user-friendly.

Thanks for reading! :)

02-24-2008, 09:00 PM
You can definitely use mod_rewrite to do what you want. And it is reliable. Maybe he is just not used to using mod_rewrite and he rather do it his way.

I suggest you go with mod_rewrite. Or use another approach, but take away that "index.php?" from the middle of the URL.

There are a few articles here on the site about making friendly URLs, you can send them to your dev guy.

02-24-2008, 11:42 PM
Mod Rewrite is tricky but it is an useful tool in the hands of a skilled developer.

02-25-2008, 01:36 AM
I don't know why many professional EE developers can't seem to figure this out. I never would leave a customers URLs looking like this.

Here is the official Wiki article to explain how to correct the issue


They list three methods I have found that File and Directory Check method works best, but your mileage may vary.