I want to remove the parameter after the true url and then redirect to the same URL without this parameter
example:
I want to remove the "r" parameter from
http://www.mysite.com/123.html?r=1
and redirect to
http://www.mysite.com/123.html
using htaccess and 301 redirect
Thank you
Try the following:
RewriteRule ^123.html.? 123.html? [L]
Note that the second URL ends with ?, this removes the query string.
?
Source: http://wiki.apache.org/httpd/RewriteQueryString
, ?, qsdiscard QSD, redirect R=301. , :
QSD
R=301
RewriteRule ^123\.html(.*)$ 123.html [QSD,L,R=301]
Source: https://habr.com/ru/post/1782245/More articles:Reject popup by clicking on button in content view - ipadembed .f4v video in html - htmlHow to close a window in firefox using javascript? - javascripthow to connect the company logo in the URL of a web application in the address bar - asp.nethow to read SESSION OPTIONS using jquery - jqueryRegEx to extract a link - c #Iterative MapReduce - pythonGWT serialization and Api add channel - javaCleaning up WinAPI controls - c ++Rails - how to update a single attribute in a controller - ruby-on-railsAll Articles