V
V
Vladimir2016-06-10 13:36:35
Joomla
Vladimir, 2016-06-10 13:36:35

Why redirect to home? Where is the mistake?

There is a path mysite.ru/news?limitstart=0
need to get rid of ?limitstart=0
I try:

RewriteCond %{QUERY_STRING} ^limitstart=0$
RewriteRule ^news http://mysite.ru/news? [R=301,L]

But it redirects to home page instead of /news

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2016-06-10
@zaharbaz

Got this option

RewriteCond %{QUERY_STRING} (^|&)limitstart=0($|&)
RewriteRule ^news$ /news? [L,R=301]

V
Viktor Taran, 2016-06-10
@shambler81

RewriteCond %{QUERY_STRING} ^limitstart=0$
#если гет запрос
RewriteCond %{REQUEST_URI}  ^news=0$
# И ньюс
RewriteRule ^.* http://mysite.ru/news? [R=301,L]

Otherwise you have a cycle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question