Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Do 301 Redirect For Multiple Pages?

Status
Not open for further replies.

tyhand

Programmer
Jul 3, 2002
186
US
Hi all,

I have a few dozen web pages under a directory on my site.

Example:
etc.

I would like to do a Permanent 301 Redirect for ALL the pages in this directory to go to a new page in a new directory or folder.

Example:
How can I accomplish this using an the HTACCESS file?

Any and all help is greatly appreciated as always. Thanks!

- Tyhand
 
Hi Feherke

Thanks for the help.

I read the documentation at the link you provided.

I'm hoping that will do the trick.

Thanks again.

- Tyhand
 
Hi all,

The "RedirectMatch" did the trick. However, I find that this redirect method is better when you have commonly named files.

If so, using the redirect with the following parameters works great:

RedirectMatch 301 /YourDirectory/CommonName([^.]+)\.html$
- Tyhand
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top