【问题标题】:RewriteRule - Special Characters (Ex:// http://test.com/test_)RewriteRule - 特殊字符(例如://http://test.com/test_)
【发布时间】:2013-07-15 09:30:54
【问题描述】:

正如标题所述,我将如何更改我的重写规则,以便在我的规则中允许特殊字符,例如 _、- 或 _

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/$ index.php?p=$1&s=$2 [L,QSA]

我的总体目标是允许诸如

之类的链接
http://mywebsite.com/users/test_

没有给出 404,因为它不允许下划线。

【问题讨论】:

    标签: html apache rewrite


    【解决方案1】:

    解决方案

    RewriteRule ^([a-zA-Z0-9:_-]+)/([a-zA-Z0-9:_-]+)/$ index.php?p=$1&s=$2 [L,QSA]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-29
      相关资源
      最近更新 更多