M
M
m3252015-06-13 11:56:14
PHP
m325, 2015-06-13 11:56:14

How to implement a redirect from tags?

Ect url site.ru/post-name/?t , you need 301 redirect to site.ru/post-name
Guru help me figure it out. Thanks

RewriteCond %{REQUEST_URI} ^(.*)\?t
RewriteRule ^(.*)\?t(.*)$ $1 [R=301,L]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
IceJOKER, 2015-06-14
@m325

RewriteEngine on
RewriteRule ^t$
RewriteRule (.*?) /$1?

S
ShamblerR, 2015-06-15
@ShamblerR

This is not a label, but a GET request, and insert "how to make a redirect with a GET request"
into Google.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question