ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Removing index.php issues

July 15, 2008 3:17pm

Subscribe [0]
  • #1 / Jul 15, 2008 3:17pm

    Corey Lane

    34 posts

    I want to remove index.php completely from my URLs. I want my URLs to be something like http://www.domain.com/template-group/template/

    The “Name of your site’s index page” is blank under general configuration in the Admin CP.

    This is my .htaccess generated using this template yanked off the wiki.

    RewriteEngine On
    RewriteCond $1 ^(member|index|about-us|party-boats|contact-us|faqs|styles|js|template-base|P[0-9]{2,8}) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]

    When I go to “Templates” and check out the “styles” template group. I click on the view link. It points me to http://dev.beachfrontboats.com/index.php?styles/global.css/ - http://dev.beachfrontboats.com/?styles/global.css/ also works. But http://dev.beachfrontboats.com/styles/global.css does not.

    Could Apache be ignoring my .htaccess file? I don’t have access to the logs to check.

    Any ideas? Thanks.

  • #2 / Jul 22, 2008 2:40pm

    Corey Lane

    34 posts

    *bump*

    Anybody?

  • #3 / Jul 22, 2008 4:12pm

    Adrienne L. Travis

    213 posts

    You need to make sure that the “Name of your site’s index page” in the control panel is set to “index.php” (or whatever the actual physical filename is), NOT blank.

    If that doesn’t help, PM me and i’ll see what i can do for you.

  • #4 / Jul 22, 2008 4:20pm

    Corey Lane

    34 posts

    @alienne

    I’ve setup another install on a different server the exact same way without issues, leaving that field blank on the other install has worked fine.

  • #5 / Jul 22, 2008 4:37pm

    Daniel Walton

    553 posts

    Change:

    RewriteRule ^(.*)$ /index.php/$1 [L]

    To:

    RewriteRule ^(.*)$ /index.php?/$1 [L]
  • #6 / Jul 22, 2008 4:39pm

    Derek Jones

    7561 posts

    You’re correct that you should leave that field blank, otherwise EE will insert it into URLs that it creates.  Looks like your server requires query strings.

    http://dev.beachfrontboats.com/index.php?/styles/global.css/
    vs.
    http://dev.beachfrontboats.com/index.php/styles/global.css/

    KB Article

  • #7 / Jul 22, 2008 4:50pm

    Corey Lane

    34 posts

    @Derek

    Thanks, could I ask my host to set AcceptPathInfo on in my virtualhost config to resolve the issue?

    Forcing the query string seems to be a temporary workaround.

  • #8 / Jul 22, 2008 4:59pm

    Derek Jones

    7561 posts

    Of course you could ask your host to support that Apache directive. 😉

    Incidentally, it wouldn’t be a temporary workaround, it’s just a limitation of certain environments, and is how PHP applications have to run in those situations.  It’s less common, though, and certainly some base their hosting decisions around these details.

  • #9 / Jul 22, 2008 5:14pm

    Adrienne L. Travis

    213 posts

    Oh, right. Sorry, Corey and Derek. I had a total brain fart there. :{

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases