1
votes

I have a list of 301 Redirects from our old site to our new Joomla site that are required.

The old url form is "www.domain.com/?library/etc/etc" and the corresponding new URL is completely different. Is there a way to set up the .htaccess file to handle these, so I can simply then do my list, e.g.,

Redirect 301 /?library/home /index.php?option=com_zoo&view=frontpage&layout=frontpage&Itemid=183

If not, what's the best way to handle these redirects? They don't currently work in the .htaccess, nor do they appear to work within the Joomla Redirect component.

thanks, Geoff

1

1 Answers

0
votes

You can't match against the query string (the ? and the stuff after it) in a Redirect or a RewriteRule. You need to match against the %{QUERY_STRING} variable in a RewriteCond:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^library/home$
RewriteRule ^$ /index.php?option=com_zoo&view=frontpage&layout=frontpage&Itemid=183 [L,R=301]

etc.