This is a discussion on Rewrite Assistance (Apache 2) within the Linux Web Servers forums, part of the Web Server and Related Forums category; I've been looking at rewrite rules for a couple days, and it's almost starting to make sense. However, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've been looking at rewrite rules for a couple days, and it's almost
starting to make sense. However, my current task has me scratching my head. Let's say I want to make requests for http://www.catfolks.net load http://www.p3ts.com/catfolks.html. In my httpd.conf file I've got: <VirtualHost 66.245.241.124:80> ServerAdmin (the usual) DocumentRoot /www/pages/catfolks.net ServerName www.catfolks.net ServerAlias catfolks.net RewriteEngine on RewriteRule (.*) http://www.p3ts.com/catfolks.html ErrorLog (the usual) CustomLog (the usual) </VirtualHost> My understanding of rewrite rules make me believe that a request for anything on catfolks.net (the (.*) part) will get redirected to http://www.p3ts.com/catfolks.html. What actually happens, though, is that I load http://www.p3ts.com (the index.html page). What am I misunderstanding about the rewrite process? |
|
|||
|
On Tue, 22 Nov 2005 15:16:02 -0800, Dan M sent:
> I've been looking at rewrite rules for a couple days, and it's almost > starting to make sense. However, my current task has me scratching my > head. > > Let's say I want to make requests for http://www.catfolks.net load > http://www.p3ts.com/catfolks.html. In my httpd.conf file I've got: > > <VirtualHost 66.245.241.124:80> > ServerAdmin (the usual) > DocumentRoot /www/pages/catfolks.net > ServerName www.catfolks.net > ServerAlias catfolks.net > RewriteEngine on > RewriteRule (.*) http://www.p3ts.com/catfolks.html ErrorLog (the usual) > CustomLog (the usual) > </VirtualHost> > > My understanding of rewrite rules make me believe that a request for > anything on catfolks.net (the (.*) part) will get redirected to > http://www.p3ts.com/catfolks.html. What actually happens, though, is that > I load http://www.p3ts.com (the index.html page). What am I > misunderstanding about the rewrite process? I would imagine that requests to www.p3ts.com wouldn't be taken care of by that VirtualHost block, as it's not one of the server names or aliases it applies to, so the rewrite rule inside it oughtn't to get applied. Perhaps you should add it to the aliases. -- If you insist on e-mailing me, use the reply-to address (it's real but temporary). But please reply to the group, like you're supposed to. This message was sent without a virus, please destroy some files yourself. |