This was on my Ubuntu desktop where I'd setup CodeIgniter.
1) Add .htaccess file to /var/www with the following content:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
2) Check ModRewriter is enabled:
cat /etc/apache2/mods-enabled/rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
3) Make sure AllowOverride is set to all
This file: /etc/apache2/sites-enabled/000-default
Should have section like:
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
4) Then restart apache if you made changes to apache config
And then you should be able to access site without the index.php in the URL.
NiCe :-)
No comments:
Post a Comment