httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Garcia Melga <mal...@gmail.com>
Subject Re: [users@httpd] mod_rewrite does not change URL in browser
Date Fri, 15 Apr 2011 20:21:24 GMT
Jeff, from your log you seem to be requesting /oldsite, but in your rewrite
rule you specify that only requests that ends with .html will be taken into
consideration.
a request to /oldsite/index.html should work.

Regards, Pablo

On Fri, Apr 15, 2011 at 2:46 PM, Jeff Shearer <jeff@shearer-family.org>wrote:

> Thanks Eric for the quick response.  However, it still doesn't work.  I
> copied you suggestion to the substitute part of the command as well as using
> the actual host and domain with no success.  Following is the rewrite.log
> using your suggestion letter for letter:
>
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb27f070/initial] (3)
> applying pattern '^/oldsite/(.*)\.html' to uri '/oldsite'
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb27f070/initial] (1) pass
> through /oldsite
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb287320/initial] (2) init
> rewrite engine with requested uri /oldsite/
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb287320/initial] (3)
> applying pattern '^/oldsite/(.*)\.html' to uri '/oldsite/'
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb287320/initial] (1) pass
> through /oldsite/
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb281080/subreq] (2) init
> rewrite engine with requested uri /oldsite/index.html
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb281080/subreq] (1) pass
> through /oldsite/index.html
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb285310/initial] (2) init
> rewrite engine with requested uri /favicon.ico
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb285310/initial] (3)
> applying pattern '^/oldsite/(.*)\.html' to uri '/favicon.ico'
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb285310/initial] (1) pass
> through /favicon.ico
>
> Here is the server build information if that makes a difference:
>
> Server version: Apache/2.2.16 (Ubuntu)
> Server built:   Nov 18 2010 21:19:28
>
>
> -----Original Message-----
> From: "Eric Covener" [covener@gmail.com]
> Date: 04/15/2011 10:09 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] mod_rewrite does not change URL in browser
>
> On Fri, Apr 15, 2011 at 1:02 PM, Jeff Shearer <jeff@shearer-family.org>
> wrote:
> > I am trying to move a set of documents from one directory to a new
> directory.  Currently users are redirected to the new directory but the old
> URL remains in the browser window.  My research indicates that if I change
> the PT flag to R I should be able to do what I want.  However, when I change
> the PT to an R, users are not actually redirected to the new directory.
>  Here is the VirtualHost configuration:
>
> Try specifying a complete protocol, hostname, etc for the substitution
> when you add the 'R' flag -- .e.g http://%{HTTP_HOST}/newsite/$1 [R]
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Mime
View raw message