【问题标题】:htaccess sub folder appending to URL附加到 URL 的 htaccess 子文件夹
【发布时间】:2013-03-25 11:47:51
【问题描述】:

伙计们,我想要从文件夹存储(我的网站根目录中的一个文件夹)指向http://qwerty-demos.co.uk/path/under-construction.html的所有内容

我现在有

<IfModule mod_rewrite.c>
  RewriteEngine on
  Redirect 301 /store/ http://qwerty-demos.co.uk/path/under-construction.html
</IfModule>

如果我只是去 qwerty-demos.co.uk/store,但只要去 qwerty-demos.co.uk/store/cart,例如,单词 cart 就会被附加到重定向 URL under-construction.htmlcart

谁能指点我正确的方向。

干杯

【问题讨论】:

    标签: .htaccess redirect


    【解决方案1】:
     Options +FollowSymLinks
     RewriteEngine on
     RewriteRule ^store.*$ http://qwerty-demos.co.uk/path/under-construction.html[r=301,L]
    

    试试这个希望对你有帮助

    【讨论】:

    • 非常感谢。非常感谢您的时间。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-06
    • 2021-05-08
    • 2015-01-21
    • 2014-06-23
    • 2023-03-26
    相关资源
    最近更新 更多