【问题标题】:redirecting to Wordpress installed in subdirectory重定向到安装在子目录中的 Wordpress
【发布时间】:2014-03-25 23:42:34
【问题描述】:

我在/demo/wp 安装了wordpress 我希望它在我het时被取走

example.com

www.example.com

我该怎么做? 我不知道.htaccess

感谢任何帮助...

谢谢

【问题讨论】:

    标签: wordpress .htaccess redirect subdirectory


    【解决方案1】:

    其实很简单。

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^webmonopolist\.com$
    RewriteRule (.*) http://www.webmonopolist.com/$1 [R=301,L]
    RewriteRule ^$ demo/wp [L]
    

    这应该会得到预期的效果。您只需要更改域名即可。

    完整解释HERE

    【讨论】:

    • 感谢您的帮助,不幸的是不适合我
    • 这应该去 wp 安装而不是位于 /demo/wp
    • nopes :( 还不行...你可以查看网址,我刚刚粘贴在上面
    • 删除 index.html 和重定向工作。在那个 index.html 文件上,将此代码添加到头部 <meta http-equiv="refresh" content="0; url=http://webmonopolist.com/" />
    • 我不明白你的意思?
    猜你喜欢
    • 2011-09-17
    • 1970-01-01
    • 2015-03-09
    • 1970-01-01
    • 1970-01-01
    • 2016-06-18
    • 2014-07-04
    • 2021-10-14
    • 2013-04-26
    相关资源
    最近更新 更多