Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

301 redirect doesn't match ...

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

Got a bit of a weird one here

I've trying to make the domain/links/* stuff do a 301 redirect to the main domain. I have the following:

RewriteRule ^links/(.*) [R=301,L]
RewriteRule ^links/?$ [R=301,L]

This works when you goto domain.com/links and domain.com/links/ ...but if you goto domain.com/links/something , I still get a 404 error

Can anyone suggest what I'm doing wrong?

TIA

Andy
 
Eugh, never mind. For some reason the .htaccess was setup as root:root - so when I was saving in FTP,it wasn't actually uploading.

I "chowned" it, and now my regex works fine =)

Cheers

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top