Mod Rewrite works if site is in a sub directory but not in the root |
[eluser]Ty Bex[/eluser]
When i designed the website it was on my server http://www.domainname.com/DEV/ and the mod rewrite worked fine. Code: /* Since I moved it to the new website. http://www.plymouthparksoccer.org/ I had to load in the index_page variable for the site to work. Code: /* The Mod requite is being picked up because if I mess up the syntax is throws a server error. Code: <IfModule mod_rewrite.c> If I do not load the index_page variable with index.php. The links will all show correctly but it only displays the home page no matter what the address bar states. The site right now is working with the index.php assigned but I would really love to know why it works if the site is in a sub directory and not if the site is in the root of the domain.
[eluser]Daniel Moore[/eluser]
For a complete walk-through of a good .htaccess, visit: http://www.danielwmoore.com/remove_index...odeigniter My first suggestion is to change: Code: RewriteRule ^(.*)$ index.php/$1 [L] to: Code: RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA] The above referenced link should tell you why if you read through it all. This may very well fix the situation you are experiencing. Another issue I would address is a simple house-cleaning issue. Your lines: Code: RewriteCond %{REQUEST_FILENAME} !-f Code: RewriteCond $1 !^(index\.php|public|images|tmp|robots\.txt|css) Code: deny from all
[eluser]Ty Bex[/eluser]
[quote author="Daniel Moore" date="1241591372"]For a complete walk-through of a good .htaccess, visit: http://www.danielwmoore.com/remove_index...odeigniter My first suggestion is to change: Code: RewriteRule ^(.*)$ index.php/$1 [L] to: Code: RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA] The above referenced link should tell you why if you read through it all. This may very well fix the situation you are experiencing. [/quote] It tuned out being the line with the ? after the index.php Code: RewriteRule ^(.*)$ index.php?/$1 [NC,L,QSA] Thank you very much and excellent file with a great description. I have been lookiing for a good description file.. |
Welcome Guest, Not a member yet? Register Sign In |