I am trying to do this htaccess 301 redirect, but I am stuck.
What I want is to remove a string in the URL, the string is: style=5&
I want the redirect it so all pages that may get that string in the URL will be removed. -- Thanks in advance.
FROM:
/viewtopic.php?style=5&f=45&t=1980&p=19136
TO:
/viewtopic.php?f=45&t=1980&p=19136
You can use this code in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.+?&)?style=5(?:&(.*))?$ [NC]
RewriteRule ^viewtopic\.php$ %{REQUEST_URI}?%1%2 [R=302,NC,L]
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다