【问题标题】:Error with url rewritingurl重写错误
【发布时间】:2018-02-07 20:35:57
【问题描述】:

我的 .htaccess:

RewriteEngine on
RewriteRule ^([a-z\-]+)$ /index.php?p=$1 [L]

RewriteRule ^/projet/([0-9\-]+)/([a-z\-]+)$ /index.php?p=projet&idapp=$1&app=$2 [L]

但是:“projet/1/storage”,我收到错误 404。 我想要一个这样的 URL,但我没有找到我的错误。

【问题讨论】:

  • 删除前导/ projet:RewriteRule ^projet/...
  • 非常感谢 Dusan Bajic !!你是最棒的!!

标签: apache .htaccess url-rewriting


【解决方案1】:

Dusan Bajic 的解决方案(来自评论)

去掉前导/ projet:RewriteRule ^projet/...

RewriteRule ^projet/([0-9\-]+)/([a-z\-]+)$ /index.php?p=projet&idapp=$1&app=$2 [L]

【讨论】:

    猜你喜欢
    • 2014-03-29
    • 2016-11-30
    • 2010-12-16
    • 2017-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-23
    • 1970-01-01
    相关资源
    最近更新 更多