[英]htaccess redirecting in some cases
我有一個.htaccess文件,它將任何請求重定向到index.html:
但我想,只有在有人要求的情況下
www.mypage.com/login
他將重定向到位於的文件
/html/login.html
我的文件到現在為止:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)$ index.html [NC]
怎么實現這個? 謝謝!
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.