我的网站有主域和子域,有htaccess重写问题,
我的问题是,www.example.com 下有 htAccess 代码,
RewriteBase /
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([^?]*).html$ content.php?pid=$1
当我使用 url 路径 www.example.com/test.html 或 www.example.com/folder/test.html 创建内容页面时,它绝对可以正常工作。
但是我的子域上有相同的代码,"文件夹"网址不起作用。我的意思是 subdomain.example.com/test.html 工作正常,但 subdomain.example.com/folder/test.html 似乎不起作用。
提前非常感谢.. :)请帮忙...
您可以在子域.htaccess中尝试以下代码:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /subdomain/
RewriteRule ^([^.]+)'.html$ subdomaincontent.php?pid=$1 [L,NC,QSA]
确保subdomain
下面没有其他.htaccess
。