Welcome to WebmasterWorld Guest from 54.167.61.200

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Redirecting folder.with variables in url's

     
9:42 pm on Mar 2, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 11, 2004
posts:147
votes: 0


I'm trying to figure out how to redirect an entire folder (now defunct) to my home page. The tricky part is, some of the files in that folder are indexed with variables as part of the URL's. Is there a way to redirect calls for ANYTHING within the folder, to the home page? Here's what I've tried with no success, along with several variations:

RewriteRule ^old-folder/(.*)$ [domain.com...] [R=301,L]

Here's a sample URL that I'm trying to redirect:
www.example.com/old-folder/file.php?prod=1556

5:56 pm on Mar 3, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 21, 2006
posts:82
votes: 0


The QUERY_STRING (what you called 'variable') will follow unchanged.
But you need to include subdirectory and/or file name.

RewriteRule ^old-folder/(.*)$ [domain.com...] [R=301,L]

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members