Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

design-is

macrumors 65816
Original poster
Oct 17, 2007
1,219
1
London / U.K.
Hi all

I'm not too hot on htaccess stuff - hoping someone can help me out.

I want to redirect all visitors to /thispage/ when they try to get to anything below it, for example /thispage/onebelowit/

Would it be something like:

Code:
Redirect 301 /thispage/* http://mysite.com/thispage/

?

Cheers for any advice...

/Doug
 
The /* in yours matches "", "/", "////", etc. The * means the character preceding either doesn't exist or occurs any number of times. In your case, the / character. The . below means any character. The + means the preceding character exists 1 or more times.

Code:
<IfModule mod_alias.c>
  Redirect permanent /thispage/.+ http://mysite.com/thispage/
</IfModule>
or
Code:
RewriteEngine On
RewriteRule ^thispage/.+ /thispage/ [R=301,L]
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.