简体   繁体   English

将重写规则更改为子文件夹

[英]changing the rewrite rule to subfolder

How do I get this code to point to a subfolder. 我如何获得此代码以指向子文件夹。

RewriteRule ^(.*)$ /index.php?/$1 [L]

previously it was www.sitename.com but now it's www.mysite.com/sitename.com 以前是www.sitename.com,现在是www.mysite.com/sitename.com

Not quite sure what do you mean. 不太清楚你的意思。

If the index.php was moved, you can change the rule like this: 如果index.php已移动,则可以像这样更改规则:

RewriteRule ^(.*)$ /sitename.com/index.php?/$1 [L]

Or you can move the .htaccess file to the subfolder (or you can create a new .htaccess file there). 或者,您可以将.htaccess文件移动到子文件夹(或者您可以在此处创建一个新的.htaccess文件)。

More on htaccess: http://www.javascriptkit.com/howto/htaccess.shtml 有关htaccess的更多信息: http : //www.javascriptkit.com/howto/htaccess.shtml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM