How do I 301 redirect all pages in a folder? |
How do I 301 redirect all pages in a folder? |
thegreatpursuit |
Dec 20 2010, 10:00 PM
Post
#1
|
Group: Members Posts: 6 Joined: 7-August 10 Member No.: 12,452 |
I want to redirect
mysite.com/main/?p=1 mysite.com/main/?p=2 mysite.com/main/?p=3 mysite.com/main/?p=4 mysite.com/main/?p=5 etc etc to mysite.com How can I do this with an htaccess file without having to manually redirect all of them? Thanks, Brandon |
pandy |
Dec 20 2010, 10:51 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
IIRC you can do...
CODE RedirectPermanent /main/ http://mysite.com |
Darin McGrew |
Dec 20 2010, 11:37 PM
Post
#3
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Failing that, look for the "Filesystem Reorganization" example in the Apache URL Rewriting Guide:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#url |
Lo-Fi Version | Time is now: 25th April 2024 - 10:37 PM |