[thelist] Redirect urls

Mark Groen evolt at markgroen.com
Sun Jul 23 12:34:16 CDT 2006


On Sat, 2006-07-22 at 23:57 -0400, Michele Foster wrote:
> Hey Mark,
> Thanks for your response ...

> On 22/07/06, Mark Groen <evolt at markgroen.com> wrote:
> > This should copy any path after the /gallery/view_photo, we're assuming
> > that "?set_albumName=TulipFest-2002&id=tulip17" is valid on the other
> > domain:
> >
> > RewriteEngine on
> > RewriteRule   ^/gallery/view_photo(.+)  http://isitbeertimeyet.ca/~$1
> >   [R,L]

> However ... the files do not exist on the new site in the same format, if at
> all.  I would like to redirect anyone looking for anything in the /gallery/
> folder on the old site to the root of the new site.  Is that possible?

'kay, think I got it now :-) This will take just requests for anything
in the gallery folder and send them to the new page. You may or may not
need the IfModule block, try it without first

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule   ^gallery(.+)  http://isitbeertimeyet.ca/index.php  [R,L]
</IfModule>

or just:
RewriteEngine on
RewriteRule   ^gallery(.+)  http://isitbeertimeyet.ca/index.php  [R,L]

Lots more examples for just about any situation at:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
geeky stuff but a necessary tool with Apache software.

-- 
cheers,

        Mark




More information about the thelist mailing list