【问题标题】:Rewrite rules .htaccess file of Drupal重写 Drupal 的规则 .htaccess 文件
【发布时间】:2014-09-29 17:35:36
【问题描述】:

我在 www.example.com/beta 中安装了一个 Drupal 站点

我正在尝试执行以下操作

  1. 当用户访问我已经实现的 www.example.com 时将用户重定向到 /beta

    RewriteBase /beta

  2. 修改 URL。例如 www.example.com/beta/products 应修改为 www.example.com/products。我只需要从 url 中删除 /beta 。

【问题讨论】:

    标签: .htaccess mod-rewrite drupal drupal-7


    【解决方案1】:

    你可以通过这个代码来做到这一点:

    Options +FollowSymLinks -MultiViews
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^beta/(.*)$ /$1 [L,NC,R]
    

    问候。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-25
      • 1970-01-01
      • 1970-01-01
      • 2017-07-16
      • 2012-11-22
      • 1970-01-01
      • 1970-01-01
      • 2012-02-24
      相关资源
      最近更新 更多