2011-10-20 114 views
0

你好,我有这样的结构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] 

现在我想将文件移动到子目录

http://localhost/folder/ci2 

我意识到这是不工作在相同的.htaccess文件 ,所以需要什么样的修改?

回答

0

你应该只需要更改为:现在

RewriteEngine on 
RewriteCond $1 !^(index\.php|resource|files|system|user_guide|robots\.txt|favicon\.ico) 
RewriteRule ^folder/ci2/(.*)$ folder/ci2/index.php [L] 
+0

排序和我的服务器上测试。 –