【问题标题】:Rewrite URL not working correctly?重写 URL 无法正常工作?
【发布时间】:2014-03-21 22:24:44
【问题描述】:

我的 htaccess 工作正常(与其他规则一致,主要是“重定向 301 链接”)。 这有什么问题?

site.local/profiles/FirstName-LastName,应该提供文件,/profiles/Firstname-LastName.php

RewriteRule /profiles/FirstName-LastName /profiles/FirstName-Lastname.php [L,QSA]

【问题讨论】:

    标签: .htaccess mod-rewrite


    【解决方案1】:
    RewriteRule ^profiles/([^/\.]+)/?$ profiles/$1.php [L]
    

    这是正确的做法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-13
      • 1970-01-01
      • 1970-01-01
      • 2011-05-15
      • 2019-04-15
      • 2014-08-25
      • 1970-01-01
      • 2016-02-28
      相关资源
      最近更新 更多