remove index.php problem |
[eluser]WebbHelp[/eluser]
Hi! I got a problem with removing the index.php in the path. 1. Here is the link: http://www.nkpg-stad.se/ I got that error, with the .htaccess file in the root(/public_html), with the codeigniter files and everything! the htaccess: Code: RewriteEngine on ------------------------------------------- 2. I also tried it on my xampp - apache server! There I got the .htaccess file in htdocs/cms (htdocs/cms/.htaccess) So there I got this "code": Code: RewriteEngine on Btw, it works a little bit, I don't need to write index.php, BUT there is no design, the design is gone, I suppose that it is the path's which is wrong. How can I solve these 2 problems? Thanks //WebbHelp
[eluser]Ben Edmunds[/eluser]
Do you have mod_rewrite enabled? Is the base_url in your config.php file correct?
[eluser]WebbHelp[/eluser]
Yes, I am pretty sure it is enabled and the base_url path is, where I got the files, in the "ftp"-page I got it into the root: http://www.nkpg-stad.se/ In my htdocs - apache server, the pathi so to /cms, because I got the files in there!
[eluser]esskay[/eluser]
Webhelp, You need to exclude css images etc from the rewrite . something like this . RewriteCond $1 !^(index\.php|images|css|js|uploads|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] ~Ess
[eluser]Ben Edmunds[/eluser]
Here's a sample htaccess you can use. Make sure the change the names as applicable. RewriteCond $1 !^(index\.php|(.*)\.swf|images|css|downloads|js|robots\.txt|favicon\.ico|sitemap\.xml) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php?$1 [L,QSA] |
Welcome Guest, Not a member yet? Register Sign In |