htaccess 301 redirect - Remove query string (QSA)

前端 未结 2 1146
清歌不尽
清歌不尽 2020-11-29 08:13

I\'ve been struggling with some htaccess redirects. I just spent some time reading and searching on stack and couldn\'t get an anwser that works with my scenario.

I\

2条回答
  •  爱一瞬间的悲伤
    2020-11-29 08:47

    You can use this rule:

    RewriteRule ^menu\.php$ /new-page-name? [L,R=301]
    

    Take note of trailing ? in the end which is used for stripping off any existing query string in the original URI.

提交回复
热议问题