httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] How to limit access by port and /pattern/?
Date Sun, 09 Feb 2003 16:37:24 GMT

On Sat, 8 Feb 2003, Roger Simmons wrote:

> I have virtual hosts setup and want to limit
> access based on port number and a pattern in the url.
>
> Is there a simple one line way to do this in the
> virtual host section?  I have read the documentation
> and searched for examples but have not found a way to
> limit access based on pattern and port.
>
> For example if the url contains /pattern1/ I only
> want access granted if the request came from port 8080.
> If the url contains /pattern2/ I only want access
> granted if the request came from port 8081 and so on.

You can do this using mod_rewrite.  Depending on exactly what type of
pattern you want to match and where in URL it is, you may also be able to
do it using <Location> or <VirtualHost> sections.

Joshua.

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