301 redirect for urls with query strings

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
RJK
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 222
Joined: Sat Sep 06, 2008 6:41 am
Location: France

301 redirect for urls with query strings

Post by RJK » Thu Apr 11, 2013 12:19 pm

I'm hopeing someone can help put me on the right path here. I'm having touble figuring how to handle a 301 redirect for a url with a query string. So, for example, I'd like to redirect the following:

Code: Select all

/index.php?option=com_content&view=category&layout=blog&id=35&Itemid=73
to...

Code: Select all

/blog
A standard 301 syntax doesn't work, hence I've tried

Code: Select all

RewriteCond %{QUERY_STRING} ^option=com_content&view=category&layout=blog&id=35&Itemid=73$
RewriteRule ^index.php$ hhttp://www.mydomain.com/blog? [L,R=301]
That also isn't working. Can anyone who knows how to achieve this help me out please?
Thanks,

Rich

sathyashankara
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Mar 14, 2012 8:26 am
Location: India
Contact:

Re: 301 redirect for urls with query strings

Post by sathyashankara » Thu Apr 25, 2013 8:08 am

Hi RJK,
I hope thread may solve your problem http://forum.joomla.org/viewtopic.php?p=1709936

almooj-craig
Joomla! Guru
Joomla! Guru
Posts: 500
Joined: Mon Aug 11, 2008 3:05 pm

Re: 301 redirect for urls with query strings

Post by almooj-craig » Thu Apr 25, 2013 2:29 pm

The first thing I noticed is that you have a typo:
RewriteRule ^index.php$ hhttp://www.mydomain.com/blog? [L,R=301]
should be
RewriteRule ^index.php$ http://www.mydomain.com/blog? [L,R=301]


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”