httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Warwick" <mwarw...@stwgtn.co.nz>
Subject RE: mod_rewrite
Date Mon, 05 Aug 2002 22:26:24 GMT
The rewriteCond directive has some tests for the existence of a file or
directory (-d and -f) that you may be able to use to redirect if a file
or path doesn't exist.
http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteCond

then see
http://httpd.apache.org/docs/misc/rewriteguide.html
for examples that test for missing files and redirect accordingly.

Michael

-----Original Message-----
From: D.Obando@ehapa.de [mailto:D.Obando@ehapa.de]
Sent: Tuesday, 6 August 2002 9:02 a.m.
To: users@httpd.apache.org
Subject: mod_rewrite


Hello, 
I got a question about the use of mod_rewrite. 
I want to install a rewrite-rule, doing the following: 
If a user requests (with an external referrer) the URL
xyz.org/example/example.html, s/he should be redirected to
xyz.org/index.html. If the user already surfs on the site (referrer
xyz.org//*), than this rule should not redirect the user.
Background: 
I have an archived website and I want Users, who enter the site via
deeplink, a search engine, ... on a subpage, to be redirected to the
homepage (xyz.org/index.html), where'll be an explanation, that it is
archived. After that redirect the user should be able to surf along as
s/he likes to.
Does anybody have a clue how to build such a rule? 


Thanks in advance, 
David 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message