Preserving double slashes in mod_rewrite

前端 未结 1 493
春和景丽
春和景丽 2020-12-22 01:43

I have searched everywhere for this answer, and the answers that have been posted do not fit my specific situation as it gives me 404 errors, and I\'m not sure why.

相关标签:
1条回答
  • 2020-12-22 02:24

    Apache removes multiple slashes inside the path. And as you’re already mentioned, you can solve this by inspecting the request line in THE_REQUEST:

    RewriteCond %{THE_REQUEST} ^[A-Z]+\ /c/([^?\ ]+)/?
    RewriteRule ^c/ /c.php?url=%1
    
    0 讨论(0)
提交回复
热议问题