From: Shane <sh...@lo...> - 2005-04-30 10:21:27
|
On Apr 27, 2005, at 7:57 PM, George Clark wrote: > Hi all, > > Is there anyone who has figured out how to get the Apache redirect > to work? > > either in .htaccess file, or in the apache config? > > I have some old URLs that I really need to somehow redirect out of > my slash > host into a different host, and nothing that I've tried works. > > (Hardcode it in a perl module someplace??? Is that all that's > left? I'm > running R41 ) > > With the old slashcode I had everything under a single hostname. > Most has been > moved to separate virtual hosts, but I have a few "simple" URLs > that we use in > some publicity ...../ye was used for kids to sign up for free > airplane rides. > (Young Eagles). We have an event upcoming and I can't redirect > www......org/ye over to a host where we have a signup page. > I've got a new > virtual host for the event, but some people might still find or use > the old > address. > > Thanks, > George This gave me a bit of frustration a while back too. I think some cmds worked if they were in the .htaccess file. Which, to me, is an abomination. I'd never really taken the time to sit down and read through the mod_rewrite docs, so I attributed it not really working to my laziness. Here's an example of some of the rules I was messing with: <IfModule mod_rewrite.c> RewriteEngine on RewriteLog /usr/local/slash/site/a2z.dyndns.org/htdocs/rewrite.txt RewriteLogLevel 1 #RewriteRule ^foo\.txt$ bar.txt #RewriteRule ^foo\.txt$ bar.txt [R] </IfModule> Note, I didn't venture so far as to modify Slash's Apache code. I would hope that wouldn't be needed. Anyone have any more experience with this that can pipe up? Shane |