[thelist] Apache redirect??
Mike Migurski
mike-evolt at teczno.com
Tue Aug 5 20:09:37 CDT 2003
>I think this is possible with apache redirect, but I am not sure. I have
>2 websites. Website B is aliased to website A. Meaning if you tried to
>go to websiteb.com, then you would end up at websitea.com. Is it
>possible to still do this for everything EXCEPT for 1 file?
>ie....websiteb.com/mypage.htm and actually have mypage.htm stored
>somewhere else?
Off-the-cuff idea: you can try redirecting mypage.htm to itself, and mark
that rule [L], then follow it with the catchall redirection rule.
'last|L' (last rule)
Stop the rewriting process here and don't apply any more rewriting
rules. This corresponds to the Perl last command or the break
command from the C language. Use this flag to prevent the
currently rewritten URL from being rewritten further by following
rules. For example, use it to rewrite the root-path URL ('/') to a
real one, e.g., '/e/www/'.
...from http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteRule
Something like:
RewriteBase /
RewriteRule ^(mypage\.htm)$ $1 [L]
RewriteRule ^(.*)$ http://websitea.com/$1 [R]
--------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html
More information about the thelist
mailing list