Help - Search - Members - Calendar
Full Version: A massive redirect via htaccess?
HTMLHelp Forums > Programming > Web Server Configuration
Nick


Hi! Hopefully this is the right place for this post - I have a big list of URLs I want to be redirected to another big list of URLs because I totally changed the structure of a website I'm working on. I have both lists lined up in two nice columns. THe question is, how can I slap them all into an htaccess file so that each one redirects to the right place?

Thanks!
Darin McGrew
Basically, you need to convert your list of URLs:
CODE
/oldpath1 /newpath1
/oldpath2 /newpath2
/oldpath3 /newpath3
...
into a list of redirection directives:
CODE
RedirectPermanent /oldpath1 http://www.example.com/newpath1
RedirectPermanent /oldpath2 http://www.example.com/newpath2
RedirectPermanent /oldpath3 http://www.example.com/newpath3
...
Nick
Excellent, thanks! Looks easy enough!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.