【问题标题】:I want to rewrite URL by .htaccess in php http://www.domain.com/door?door=french-doors to http://www.domain.com/door/french-doors [closed]我想通过 .htaccess 将 php http://www.domain.com/door?door=french-doors 中的 URL 重写为 http://www.domain.com/door/french-doors [关闭]
【发布时间】:2015-06-03 09:35:05
【问题描述】:

请帮我用 .htaccess 重写 URL

 http://www.domain.com/door?door=casement-doors 

 http://www.domain.com/door/casement-doors.

【问题讨论】:

标签: php apache .htaccess urlhelper


【解决方案1】:

在你的 htaccess 中试试这个:

RewriteEngine on
RewriteCond %{QUERY_STRING} ^door=([^&]+) [NC] 
RewriteRule ^door /door/%1? [NC,L,R]

【讨论】:

    猜你喜欢
    • 2021-09-18
    • 1970-01-01
    • 1970-01-01
    • 2020-07-14
    • 1970-01-01
    • 2014-05-07
    • 1970-01-01
    • 1970-01-01
    • 2011-10-23
    相关资源
    最近更新 更多