我一直在试图把2个独立的网站放在subfoldres中,并使用rewites来加载它们。Htaccess重写为子域名
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} !^www\.udstde\.co\.uk
RewriteCond %{HTTP_HOST} test1\.udstde\.co\.uk
RewriteRule (.*) /test1/index.php [L]
RewriteCond %{HTTP_HOST} !^www\.udstde\.co\.uk
RewriteCond %{HTTP_HOST} test2\.udstde\.co\.uk
RewriteRule (.*) /test2/index.php [L]
问题是第一个工作正常,但第二个没有。
任何人都可以看到我会出错吗?
可以在apache的重写模式中使用变量作为 [用于在.htaccess单一的RewriteCond多的RewriteRules] [1] [1]:HTTP://计算器。 com/questions/7218164/multiple-rewriterules-for-single-rewritecond-in-htaccess/11559655#11559655 – Huseyin