dongtuanzi1080 2016-11-29 11:09
浏览 14
已采纳

没有基本名称的htaccess重定向[关闭]

I am handling some urls with the htaccess like below

B)https://www.example.com/online/development/id

Rules:

RewriteRule ^online/(.*)/(.*)$ filename.php?key=$2 [L]

But Now I want to use some urls like below:-

https://www.example.com/development/id

How Can I do this?

  • 写回答

2条回答 默认 最新

  • doushi8231 2016-11-29 11:12
    关注

    You can use this rule-

    RewriteRule ^([\w-]+)/([\w-]+)$ filename.php?key=$2 [QSA,L]
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?