LoadModule rewrite_module modules/mod_rewrite.so of the local httpd.conf file has been turned on
The .htaccess file rewriting rules in the root directory are as follows:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
Already set in the config.php file: 'URL_MODEL' => 2,
Published to the server for access: http://domain name/admin can be accessed correctly, but in the local test environment, access after applying the root directory virtual domain name:
http://inurse.com/admin error reporting:
404 NOT Found
The requested URL /Admin/Org/orgAdd was not found on this server.
I would like to ask why this is? What is the principle of Apache rewriting routing rules (easy-to-understand explanation)?
Another: Rewrite rules have been tried: RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
RewriteRule ^( .*)$ index.php?s=/$1 [QSA,PT,L]
Owner, your configuration seems to be wrong:
1. The following configuration should be the apache configuration httpd.conf
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
2. .htaccess configuration only requires the middle one:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
It is recommended to use the second method;