Take the 2-minute tour ×

I have a site in a folder called patients

urls look like this:


I want to redirect

site.com/patients/post-name → newsite.com/post-name


site.com/patients/ → newsite.com/

I've tried this, but site.com/patients still directs to newsitesite.com/patients

Redirect 301 ^/patients/$ http://www.newsite.com/
Redirect 301 / http://newsite.com/

Does htaccess have some ssort of regex to match just the root of /patients/ and then another one for /patients/whatever-comes-next ?

share|improve this question

2 Answers 2

REDIRECT 301 /patients http://newsite.com

does that work?

share|improve this answer
I have thousands of posts, I can't write a line for every post, need a catch all solution. –  wesbos Jan 3 '13 at 16:41
whoops sorry right, all the posts.... –  ChrisArchitect Jan 3 '13 at 16:56

In general, there are two solutions for "301" POST error:

1) Always add a trailing backslash to your "POST" URL (preferred)

2) Create an "Alias" in your httpd.conf file for the "POST" URL:

In your case, you want a redirect for two purposes. Check out this link (closed as off-topic, but still useful):

share|improve this answer
1) I can't tell visitors to always add a slash –  wesbos Jan 3 '13 at 16:04
2) I don't have access to httpd.conf. Looking to do this with htaccess –  wesbos Jan 3 '13 at 16:04
Is there not some sort of regex for the exact match of /patients/ and then the match of /patients/**** ? –  wesbos Jan 3 '13 at 16:15

Your Answer


