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.

Can't access weblogs after modifying .htaccess file to remove index.php (it's adding a

October 23, 2008 12:47pm

Subscribe [2]
  • #1 / Oct 23, 2008 12:47pm

    los1sol

    41 posts

    I read all the documentation on how to remove index.php and I decided to go with the first method (include) and this is what my .htaccess file looks like:

    RewriteEngine on 
    RewriteCond $1 ^(weblog|member|search|forum|site|embeds|products|events|about|contact|gallery|P[0-9]{2,8}) [NC] 
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    I also made sure I removed “index.php” from my Admin -> System Preferences -> General Configuration -> “name of your site Index page” field. I went ahead and deleted any reference to index.php that I had in my embedded navigation templates and hardcoded the URLs. All was well until I noticed that my site was not linking to my stylesheet. I then came across a post that instructed me to add the “?” to the end of my index.php in my .htaccess file (i’m on godaddy shared hosting), and that did the trick.

    So I’m almost finished getting rid of the index.php in my URLs! But I just have one little problem:

    New and old weblogs are adding a question mark to the URLs. Does anybody know why this is happening? Or where I can go to get rid of it?

    This is my site: http://www.pawsonpalmer.com/ (i have a redirect that takes users to the events page until I get more stuff done on the homepage). If you go to http://www.pawsonpalmer.com/products and click on any of the product categories in the main content section (not the side navigation) you’ll see it adds the “?” when you hover over any of the icons.

    It’s also happening on the events page http://www.pawsonpalmer.com/events when you try to click on an actual post.

    Any and all help will be greatly appreciated. Thanks

  • #2 / Oct 23, 2008 12:50pm

    los1sol

    41 posts

    I read all the documentation on how to remove index.php and I decided to go with the first method (include) and this is what my .htaccess file looks like:

    RewriteEngine on 
    RewriteCond $1 ^(weblog|member|search|forum|site|embeds|products|events|about|contact|gallery|P[0-9]{2,8}) [NC] 
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    I also made sure I removed “index.php” from my Admin -> System Preferences -> General Configuration -> “name of your site Index page” field. I went ahead and deleted any reference to index.php that I had in my embedded navigation templates and hardcoded the URLs. All was well until I noticed that my site was not linking to my stylesheet. I then came across a post that instructed me to add the “?” to the end of my index.php in my .htaccess file (i’m on godaddy shared hosting), and that did the trick.

    So I’m almost finished getting rid of the index.php in my URLs! But I just have one little problem:

    New and old weblogs are adding a question mark to the URLs. Does anybody know why this is happening? Or where I can go to get rid of it?

    This is my site: http://www.pawsonpalmer.com/ (i have a redirect that takes users to the events page until I get more stuff done on the homepage). If you go to http://www.pawsonpalmer.com/products and click on any of the product categories in the main content section (not the side navigation) you’ll see it adds the “?” when you hover over any of the icons.

    It’s also happening on the events page http://www.pawsonpalmer.com/events when you try to click on an actual post.

    Any and all help will be greatly appreciated. Thanks

  • #3 / Oct 23, 2008 1:14pm

    Greg Aker

    6022 posts

    los1sol:

    We can’t officially support removal of index.php in your urls, so I’m moving this over to “How to”

    However, check CP Home ›  Admin ›  System Preferences ›  Output and Debugging Preferences and your setting for “Force Query String”  If it’s set to “Yes”  try setting it to “no” and see if that works.

    Regards,

    -greg

  • #4 / Oct 23, 2008 1:17pm

    los1sol

    41 posts

    That did it!!

    THanks a million.

  • #5 / Oct 23, 2008 1:18pm

    Greg Aker

    6022 posts

    cool.

    I’m glad it worked for you.  😉

    -greg

  • #6 / Oct 23, 2008 4:24pm

    Ingmar

    29245 posts

    You probably have “force query strings” turned on.

  • #7 / Oct 23, 2008 4:27pm

    Ingmar

    29245 posts

    I merged the two threads, no need to double post. Thanks.

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

ExpressionEngine News!

#eecms, #events, #releases