Mod rewrite mod_重写对子目录的更改
你好,我有这个结构Mod rewrite mod_重写对子目录的更改,mod-rewrite,Mod Rewrite,你好,我有这个结构 http://localhost/ci2 使用此.htaccess进入ci2 RewriteEngine on RewriteRule ^$ /ci2/index.php [L] RewriteCond $1 !^(index\.php|resource|files|system|user_guide|robots\.txt|favicon\.ico) RewriteRule ^(.*)$ /ci2/index.php/$1 [L] 现在我想把文件移到一个子目录 h
http://localhost/ci2
使用此.htaccess进入ci2
RewriteEngine on
RewriteRule ^$ /ci2/index.php [L]
RewriteCond $1 !^(index\.php|resource|files|system|user_guide|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /ci2/index.php/$1 [L]
现在我想把文件移到一个子目录
http://localhost/folder/ci2
我意识到它不能使用相同的.htaccess文件
那么,需要进行哪些修改 您只需更改为:
RewriteEngine on
RewriteCond $1 !^(index\.php|resource|files|system|user_guide|robots\.txt|favicon\.ico)
RewriteRule ^folder/ci2/(.*)$ folder/ci2/index.php [L]
现在排序并在我的服务器上测试。