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/metho
I think your question is also answered here
RewriteEngine On
RewriteBase /
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
# Enforce www
# If you have subdomains, you can add them to
# the list using the "|" (OR) regex operator
RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
RewriteRule ^(.*)$ http://www.plugb.com/$1 [L,R=301]
RewriteBase /
RewriteCond %{HTTP_HOST} !=""
RewriteRule ^index.php(/.*)?$ http://%{HTTP_HOST}$1 [R=301]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
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
AllowOverride All
<Directory /var/www/html>
AllowOverride All
</Directory>
Save and exit.
Now restart Apache to put the change into effect:
sudo systemctl restart httpd
rest this worked for me