Help: .htaccess redirects
MovableType, Website 01/11/2006 |Never having quite gotten the hang of .htaccess redirect requests, I’m hoping someone out there might be able to give me a hand with this.
I would like this…
http://www.michaelhanscom.com/eclecticism/tags/pickatag
…to map to this (though not wrapped onto multiple lines, obviously)…
http://www.michaelhanscom.com/cgi-bin/mt/mt-tags.cgi?
blog_id=1&tags=pickatag
Similarly, for multiple tags, this…
http://www.michaelhanscom.com/eclecticism/tags/pickatag+anytag
…should map to this (and so on, as more tags are added)…
http://www.michaelhanscom.com/cgi-bin/mt/mt-tags.cgi?
blog_id=1&tags=pickatag+anytag
Any ideas? Thanks much in advance!
![]()
“Mexican Women” by Throwing Muses from the album Just Say Yo (1988, 2:49).
[See also: schrodingerscat | This is a test… | Tag Intersections | Upcoming Photothingies | ecto powered ]
7 Responses to “Help: .htaccess redirects”
Leave a Reply






January 12th, 2006 at 1:51 am
Ugh… I hate redirect rules… such a pain! I think this should do it:
January 12th, 2006 at 1:52 am
Note, that should be 2 separate lines with a split after the first /
January 14th, 2006 at 5:38 pm
Soo, any luck with those rules by Ryan?
January 15th, 2006 at 9:53 am
Not yet, nope. I’ve tried putting those lines in the existing .htaccess at the root of my webspace, and in a new .htaccess under
/eclecticism/, but still just get 404s when I try to go to/eclecticism/tags/anything. I’ll keep poking at it…January 15th, 2006 at 5:32 pm
I would try doing a redirect rather than a rewrite to see exactly what it’s trying to rewrite to. ie:
RewriteRule ^eclecticism/tags/(.*)$ /cgi-bin/mt/mt-tags.cig?blog_id=1&tags=$1 [R,L]
Good luck. I’ll break out the ‘mad rewrite-fu’ (as the kids call it these days) if you need—I’ve just eyeballed the rule and it looks ok but haven’t tested it.
May 6th, 2006 at 8:18 pm
you should do it like this
Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html
in your htaccess file
May 6th, 2006 at 8:19 pm
you should do it like this
Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html
in your htaccess file
you can also make it a 301 or 302 redirect