0

I have been trying to remove the index.php from my website. I have tried everything mentioned on the ee documentation but nothing seemed to work. I also tried to enable force force query string, it didn't work either.

I'm running the website on bluehost and I think maybe the problem is associated with the server? I contacted them and they mentioned that the mod_rewrite apache is running on all their websites just fine. Not sure what the solution to this problem.

this is the same code that I used in my .htaccess file

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /my_site_url.net/

    # Removes index.php from ExpressionEngine URLs
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !/system/.* [NC]
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

    # Directs all EE web requests through the site index file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
    </IfModule>
  • I also wanted to mention that I get a blank page – user3282 Nov 11 '14 at 10:17
  • 2
    Why do u use "RewriteBase /my_site_url.net/" ? Do you have folder my_site_url.net in your public_html and index.php is inside this folder? Did u try "RewriteBase /" – Max Lazar Nov 11 '14 at 12:31
  • no I don't have a folder named like that, but I added my site name that's what I meant. I also tried RewriteBase / .. and I also tried to change the $config['uri_protocol'] to PATH_INFO and I also tried REQUEST URI in the config file as mentioned in some of the answers here on the website, but it didn't work at all. What am I possibly missing? – user3282 Nov 12 '14 at 4:30
  • in any case will be enouth "RewriteBase /" - is not correct to use it like you do (you can read httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritebase). Try this one devot-ee.com/articles/item/…, if this code will works, you can try gist.github.com/3439374.git. What hosting you use? did you try to add "?" for index.php? like "RewriteRule ^(.*)$ /index.php?/$1 [L]" – Max Lazar Nov 12 '14 at 6:29
  • Thanks for the links, I'll try them. I'm using bluehost and I tried to"?" as well, but it didn't work. – user3282 Nov 12 '14 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.