这是我的自动生成htaccess文件
在
RewriteEngine叙述 的RewriteCond%{HTTP_HOST} ^ M .rgaads .COM $ [OR]
的RewriteCond%{HTTP_HOST} ^ WWW .M .rgaads .COM $
重写规则^ /?$M .rgaads .COM /指数 html的[R = 301,L]
解决方案
您可以再补充的DirectoryIndex
来避免上述规则:
的DirectoryIndex index.html的
PS:你需要把 HTTP:在目标URL或使用目标//
不含域名,如果用在同一主机:
RewriteEngine叙述上
的RewriteCond%{HTTP_HOST} ^(WWW )?m .rgaads .COM $ [NC]
重写规则^ /?$ /index.html [R = 301,L]
This is my auto generated htaccess file
RewriteEngine on
RewriteCond %{HTTP_HOST} ^m.rgaads.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.m.rgaads.com$
RewriteRule ^/?$ "m.rgaads.com/index.html" [R=301,L]
解决方案
You can just add DirectoryIndex
to avoid above rule:
DirectoryIndex index.html
PS: You need to put http://
in target URL or use target without domain name if used in same host:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?m.rgaads.com$ [NC]
RewriteRule ^/?$ /index.html [R=301,L]