Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 25453 invoked by uid 500); 6 Aug 2002 09:27:35 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 25440 invoked from network); 6 Aug 2002 09:27:35 -0000 Received: from cphegtd2-itn01.egmont.com (194.192.151.9) by daedalus.apache.org with SMTP; 6 Aug 2002 09:27:35 -0000 Received: by cphegtd2-itn01 with Internet Mail Service (5.5.2653.19) id ; Tue, 6 Aug 2002 11:27:35 +0200 Message-ID: <7FDBAD079B84D411BA3900306E00D15F01F72F3C@strevd1-xch02> From: D.Obando@ehapa.de To: users@httpd.apache.org Subject: AW: mod_rewrite Date: Tue, 6 Aug 2002 11:27:44 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N hy, well I don't need an rewriteCond for missing files, but want to redirect users with external referrers from subpages to the homepage. I wrote a rule, but it does not work, something's wrong with it: RewriteEngine on RewriteCond %{HTTP_REFERER} - [OR,NC] #everybody with no referrer... RewriteCond %{HTTP_REFERER} !^http://www.yps.de/.*$ [NC] # or everybody with a referrer that does not start with http://www.yps.de... RewriteRule ^/$ /index.html [r] # should be redirected from subpages to the startpage Greetings, David > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org