Welcome to WebmasterWorld Guest from

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
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:

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

Junior Member

10+ Year Member

joined:Jan 21, 2006
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