2017-07-07 55 views
0

当我去https://www.safepub.com它重定向到https://www.safepub.com/home。我如何才能停止?我在.htaccess文件中发现了这个:如何获得此页面重定向? (.htaccess)

RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.safepub.com/$1 [R,L] 

    RewriteCond %{REQUEST_URI} ^/$ 
    RewriteRule ^(.*)$ https://www.safepub.com/home [r=301,nc,L] 

    RewriteCond ${REQUEST_URI} ^/store/(.*)$ 
    RewriteRule ^/store/(.*)$ https://www.safepub.com/$1 [r=301,nc,L] 

我对这种语言不是很熟悉,所以我不确定它是什么意思。任何帮助将不胜感激。谢谢。

回答

0
RewriteCond %{REQUEST_URI} ^/$ 
RewriteRule ^(.*)$ https://www.safepub.com/home [r=301,nc,L] 

在上述各行RewriteCond检查,如果没有串/后,那么它将REQUEST_URI重定向到https://www.safepub.com/home
标记R(默认R = 301)将带您重定向的网址。如果你不想重写你的网址到/home然后删除国旗R