homepage Welcome to WebmasterWorld Guest from 54.227.215.139
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
301 Redirect (Help A Noob)
ChrisWilson



 
Msg#: 4329477 posted 5:12 pm on Jun 22, 2011 (gmt 0)

Here is the scenario:

I am very unhappy with how my site returns results via the internal search, so while I tweek this, I was trying to take some of my most popular KW searches and direct them to the appropriate landing page.

I have yet to be able to get it to work

Here is an example query of the term widget
search.php?main_page=advanced_search_result&search_in_description=1&inc_subcat=1&keyword=widget&search.x=0&search.y=0

I would just like to redirect this to
http://blablabla.com/widget-landing-page.html

Yet it never works..

I tried :

Redirect 301 search.php?main_page=advanced_search_result&search_in_description=1&inc_subcat=1&keyword=widget&search.x=0&search.y=0 http://blablabla.com/widget-landing-page.html

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4329477 posted 6:56 pm on Jun 22, 2011 (gmt 0)

The Redirect directive cannot see appended query string data.

Use RewriteRule with a preceding RewriteCond looking at the QUERY_STRING request variable.

You cannot ever redirect POST requests.

ChrisWilson



 
Msg#: 4329477 posted 8:12 pm on Jun 22, 2011 (gmt 0)

Thanks, off to research RewriteRule =)

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