...

View Full Version : htaccess 301 help



suzkaw
08-17-2007, 04:06 PM
Hi,

I have moved a folder on a site and I am wanting to do a 301 redirect on the old folder.

So I have created my .htaccess file and included this:


Redirect 301 /sites/ http://www.mysite.com/links/


This works and redirects however if the user visits sites/cat/animals/ it will redirect to links/cat/animals/

So I am basically needing a way for it to drop anything after sites/. Is this possible?

Pennimus
08-17-2007, 05:32 PM
Yes it's certainly possible using regular expressions. Though, this isn't a PHP question, it probably belongs in "other server side languages/issues" or "general web building".

But in the meantime you can look up mod_rewrite regular expressions and take a stab yourself.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum