Sorry for my bad english...
I have the most basic possible CodeIgniter setup and can't make it work... if i access the url http://domain.com/index.php?controllerX/method it works fine.
Now I want to be able to access http://domain.com/method
I configured on routes.php "controllerX" to be the default controller and try to use the follow .htaccess:
RewriteEngine on
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /index.php/$1 [L]
I have tried multiple .htaccess and everytime the server just returns 403 errors. Even if my .htaccess contains only the first line "RewriteEngine on", it shows 403 errors. I have tried to set every folder to chmod 777 or 755 to test and this change nothing.
Is there a way to see what resource are giving the 403 error? Or am I comiting a mistake elsewhere?
Ok, i readed somewhere that I need "Options +FollowSymLink" on my htaccess ... with that the server show me 500 errors :(
EDIT Ok, now its working, with the follow htaccess:
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /index.php/$1 [L]
change your .htaccess file as:
apart from the changes we did in .htaccess file we also have to verify/changed the following setting :
Apache to read .htaccess files located under the /var/www/html directory. You can do this by editing httpd.conf file:
sudo nano /etc/httpd/conf/httpd.conf
Find the section and change AllowOverride None to
Now restart Apache to put the change into effect:
sudo systemctl restart httpd
rest this worked for me
I think your question is also answered here