3

I'm trying to have one url redirect to a different url, and I'm trying to get Joomla to handle it.

In com_redirect in the Joomla admin, I'll add an entry for one url to be redirected to an second url, but the redirect doesn't happen.

For example:

Source URL: http://www.domain/menu?query=param
Destination URL: http://www.domain/destination
Status: Enabled

I have my htaccess file setup and url rewriting enabled in the global configuration. What do i need to do to get this redirect working?

  • Is the redirect plugin enabled? – David Fritsch Sep 26 '14 at 17:46
  • yes, the plugin is enabled. I've also tried trashing all the disabled redirects, but the one that's enabled still won't work – ContextSwitch Sep 26 '14 at 19:33
4

I have not tested it with Redirect Component but you can not redirect url with GET parameters as they get passed in a different variable in Apache. So your source would be ignored.
You would need to write it in the .htaccess file with extra settings: (not tested)

RewriteCond %{QUERY_STRING} (^|&)query=param(&|$) [NC]
RewriteCond %{REQUEST_URI} ^/menu [NC]
RewriteRule .* /destination [R=301,L]

See for other examples:
https://wiki.apache.org/httpd/RewriteQueryString
https://stackoverflow.com/questions/19165811/htaccess-rewrite-with-http-host-and-query-string

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.