[英]htaccess redirecting in some cases
I got an .htaccess file which redirects any request to index.html: 我有一个.htaccess文件,它将任何请求重定向到index.html:
But i want, that only in case if somebody request to 但我想,只有在有人要求的情况下
www.mypage.com/login
that he will redirected to a file which is located in 他将重定向到位于的文件
/html/login.html
Here my file till now: 我的文件到现在为止:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)$ index.html [NC]
How to implement this? 怎么实现这个? Thx!
谢谢!
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]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.