.htaccess 子域访问重写

.htaccess 子域访问重写,.htaccess,mod-rewrite,url-rewriting,.htaccess,Mod Rewrite,Url Rewriting,我有dashboard.domain.com作为客户端的仪表板。 在我拥有的子域的.htaccess文件中 RewriteRule ^v/([a-zA-Z])/ index.php?flag=$1 [L] 在仪表板导航中,我有两个链接:“/v/t”和“/logout” 按照重写规则,它适用于/v/链接,但当我转到注销链接时,它抛出404错误。我的重写遗漏了什么 我的重写遗漏了什么 嗯,^v/在您的regexp中,并且在“/logout”链接中缺少它?好吧,我希望某些页面是dashboard.d

我有dashboard.domain.com作为客户端的仪表板。 在我拥有的子域的.htaccess文件中

RewriteRule ^v/([a-zA-Z])/ index.php?flag=$1 [L]
在仪表板导航中,我有两个链接:“/v/t”和“/logout”

按照重写规则,它适用于/v/链接,但当我转到注销链接时,它抛出404错误。我的重写遗漏了什么

我的重写遗漏了什么


嗯,^v/在您的regexp中,并且在“/logout”链接中缺少它?

好吧,我希望某些页面是dashboard.domain.com/v/,并且仍然有普通页面,如dashboard.domain.com/logout、dashboard.domain.com/login、dashboard.domain.com/。。因此,对于要使用的URL来说,缺少它是故意的,但不知道为什么/v/rewrite会影响logout/login/其他指向实际页面的正常地址,而不需要重写。