M
M
Miken9122015-04-08 19:34:22
Joomla
Miken912, 2015-04-08 19:34:22

How to make a 301 redirect from a strict address with a parameter to a new one without a parameter?

We migrate the site to Joomla 3. And we ran into a problem, the standard redirect component could not make redirects from old addresses to new ones.
We tried to register a redirect in .htaccess on our own, but it also does not work.
The essence is something like this.

oldsite/index.php?id=2 -> newsite/katalog
oldsite/index.php?id=3 -> newsite/price
oldsite/index.php?id=4 -> newsite/katalog/subcat2

We tried different options, like this:
RewriteRule ^index\.php?id=2$ /katalog [R=301,L]
redirect 301 index.php?id=2 newsite/katalog

with all options, the page of the site with the material whose id= to the one specified in ?id=2
simply opens. How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2015-04-08
@Miken912

RewriteCond %{QUERY_STRING} ^id=2$
RewriteRule ^index.php$ http://newsite.ru/catalog? [L,R=301]

cac922bb46.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question