【问题标题】:.Htaccess to exclude path and run WordPress.htaccess 排除路径并运行 WordPress
【发布时间】:2016-12-23 21:36:08
【问题描述】:
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

我试过RewriteCond %{REQUEST_URI} !^/blog/.*$它不起作用

我不知道当前站点上正在运行什么应用程序,我无法在 example.com/blog 上安装 wordpress,因为它返回了 404 页面。如何排除 example.com/blog 以避免运行现有的 webapp 但安装 wordpress?

【问题讨论】:

    标签: php wordpress .htaccess web-applications


    【解决方案1】:

    好像是 CakePHP 的 .htaccess

    用给定的代码替换当前的.htaccess 代码。

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule (blog/.*) $1 [L] 
        RewriteRule    ^$ app/webroot/    [L]
        RewriteRule    (.*) app/webroot/$1 [L]
    </IfModule>
    

    在进行任何更改之前,请不要忘记备份您当前的 .htaccess 文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-26
      • 2014-10-27
      • 1970-01-01
      • 1970-01-01
      • 2012-06-02
      • 2020-07-09
      相关资源
      最近更新 更多