0

我有一个 .htaccess 文件,它将任何请求重定向到 index.html:

但我想要,只有在有人要求的情况下

www.mypage.com/login

他将重定向到位于

/html/login.html

到目前为止我的文件:

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)$ index.html [NC]

如何实施?谢谢!

4

1 回答 1

2
RewriteEngine on
RewriteBase /
Options +FollowSymlinks

RewriteRule ^/?login/?$ http://www.mypage.com/html/login.html [NC,R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.html [NC]
于 2012-11-08T20:53:12.637 回答