Error in the current documentation |
[eluser]Alexxz[/eluser]
http://ellislab.com/codeigniter/user-gui.../urls.html Current version: RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] It must be RewriteEngine on RewriteCond $1 !^/(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L]
[eluser]louis w[/eluser]
I'm not sure this is always the case. What platform are you on? Have you tried using Code: RewriteBase /
[eluser]Alexxz[/eluser]
I've tried add line RewriteBase / into my vhosts config file The result is Quote:#service myapache restart My system Quote:Ubuntu Linux 2.6.27-11-generic My config Quote:<VirtualHost *:80>
[eluser]louis w[/eluser]
Have you tried entering this information in an htaccess file instead?
[eluser]Alexxz[/eluser]
I have no htaccess file and i have no reason to make it.
[eluser]louis w[/eluser]
Not even to see if it would work or not? I prefer to manage my mod_rewrite through an htaccess file. It makes a site more self contained as well as makes the rules less transparent. I believe it's telling you to add a <Directory ...> declaration in your conf.
[eluser]Alexxz[/eluser]
Yep it works. <Directory /server/www/example.com/htdocs> RewriteEngine on # RewriteBase / RewriteCond $1 !^(index\.php|mp3|swf|js|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] </Directory> May be this information must be in manual?
[eluser]louis w[/eluser]
Glad you got it working. The information in the manual is aimed towards people doing this in their htaccess, which doesn't require <Directory ..>. I think they were trying to keep things as simple as possible so it would be easier to implement. Many people don't have access to apache or virtual host config files. |
Welcome Guest, Not a member yet? Register Sign In |