htaccess - redirecting all requests to domain root

后端 未结 2 1562
猫巷女王i
猫巷女王i 2021-01-02 00:37

I have a site that is no longer needed live and has a holding page setup to state that it\'s no longer available. All requests to pages on the site (bookmarked or otherwise)

相关标签:
2条回答
  • 2021-01-02 01:21

    Is your problem solved? If not, have you tried:

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . /index.php [L]
    
    0 讨论(0)
  • 2021-01-02 01:23

    Just use it like this :

    RewriteRule ^.+$ / [R=302,NC,L]
    

    It will redirect all that don't match / only to /.

    0 讨论(0)
提交回复
热议问题