You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Boysenberry Payne <bo...@humaniteque.com> on 2006/02/20 16:08:38 UTC

[users@httpd] Getting mod_rewrite working for virtual hosts

After looking through previous threads I thought I had my solution to 
getting
mod_rewrite to work with virtual hosts.
Here is the system:
Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 
mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.22 
OpenSSL/0.9.7a

Here is what I put into httpd.conf:


<VirtualHost *:80>

	RewriteEngine on
	RewriteOptions inherit
	RewriteRule  ^(.*)log[/]?$ http://69.72.241.170:81/pro/admin.pl [P]
	RewriteRule  ^(.*)log/(.*)$ 
http://69.72.241.170:81/pro/admin.pl?data=$2 [P]

</VirtualHost>

I also tried:

<Directory "/home/*/public_html/">

	Options -Indexes
	RewriteEngine on
	RewriteOptions inherit
	RewriteRule  ^(.*)log[/]?$ http://69.72.241.170:81/pro/admin.pl [P]
	RewriteRule  ^(.*)log/(.*)$ 
http://69.72.241.170:81/pro/admin.pl?data=$2 [P]

</Directory>

Neither of them works so far.  What am I missing?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.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


Re: [users@httpd] Getting mod_rewrite working for virtual hosts

Posted by Robert Ionescu <ro...@googlemail.com>.
Boysenberry Payne wrote:
> <VirtualHost *:80>
> 
>     RewriteEngine on
>     RewriteOptions inherit
>     RewriteRule  ^(.*)log[/]?$ http://69.72.241.170:81/pro/admin.pl [P]
>     RewriteRule  ^(.*)log/(.*)$ 
> http://69.72.241.170:81/pro/admin.pl?data=$2 [P]
> 
> </VirtualHost>

> Neither of them works so far.  What am I missing?

And what exactly did you request and what was the response from the 
server (status code)? Also: What is logged in your RewriteLog (needs to 
be enabled first with

RewriteLog logs/rewrite.log
Rewriteloglevel 5

Did you restart apache? Anything in your error.log?

-- 
Robert

---------------------------------------------------------------------
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