homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

301 redirect including url parameters
301, redirect

 10:01 pm on Jul 19, 2012 (gmt 0)


I need to redirect some sub directories of a site by identifying parameters in the URL

I have several urls I need to 301 redirect to a different site permenatly


I would like to redirect 301 the following URLs


There's also the following URL that I want to stay where they are.


And I would like the redirect to go to


HELP! Please...



 6:31 am on Jul 20, 2012 (gmt 0)

Read the last few posts in this Forum. It can't be much more than 24 hours since I last posted the boilerplate on query strings (parameters). That will be your starting point.


 12:46 pm on Jul 20, 2012 (gmt 0)

Since you want to leave some pages in the /test/ directory you will have to 301 all pages individually on the .htaccess that you want to redirect:

RewriteRule ^test/page-to-keep$ [newsite.com...] [R=301,L]

If you wanted to just 301 the entire directory and add new pages for the ones you want to keep you could use the following:

Rewriterule ^test/(.*) [newdomain.com...] [R=301,L]


 1:15 pm on Jul 20, 2012 (gmt 0)

Bill. You added a sticky thread a few months ago asking people to use example.com in this forum so that URL auto-linking would be suppressed. Since that request was posted only three or four people have managed to comply with it.


 9:50 pm on Jul 20, 2012 (gmt 0)

But the OP was one of them-- unless Bill was in a hurry and didn't have time for the "thread tidy" boilerplate-- so let's be nice to him ;)

Just noticed that if you are starting a new topic in this forum, the Sticky will also be visible at the bottom of the screen in the "This Forum: Newer" spot.

lc, he will have to look at the query string, because that's the significant variable. A conditionless Rule won't work. (France and Germany come with him; Swizerland stays put. Heh.)


 7:30 am on Jul 21, 2012 (gmt 0)

Lucy, you're correct that's exactly what I need to do.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved