httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toni Maatta <t...@borgship.net>
Subject Re: [users@httpd] rewrite problem
Date Mon, 03 Feb 2003 07:55:03 GMT
Hi Paul,

Well.. You understood me wrong, so.. :)

Let's say I have two machines; www-server, which handles all .html files
only and cgi-server, which handles all cgi-scripts.

So I want that www-server handles .html files and cgi-server
.cgi/.pl/whatever files.

Now when user uses url http://www.company.com/ I'd like to know what
document user is trying to access. if it's a index.html I want that my
www-server handles that request and if it eg. index.cgi I want that my
www-server rewrites it and redirect it to cgi-server. 

So I'd like to get document name every time and rewrite it if
neccessary. I have tried some options, but I haven't been able to get it
work. in rewrite log there's no document name in input field, when
accessing "main page".

I hope you understand my problem now.. ;)

On Mon, Feb 03, 2003 at 03:45:19PM +0800, Paul Muad`dib wrote:
> Hi Toni,
> 
> first I don't really understand what you want but maybe this will help you :
> 
> 1) you don't need to expand an URL
>  Apache automatically does it for you whenever there is a index.html in the
> document folder it will autmatically show it.
>  If you want to have to show an index.php instead of index.html you need to
> set that in your httpd.conf :
>  DirectoryIndex index.php index.html
>  --> this means apache first will try to call index.php if it doesn't exist
> it will show index.html
> 
> 2) Redirecting pl/php scripts
> There is an existing Directive for it ( you can find in the documentation
> for further information ), I think you look for that :
> AddHandler perl .pl
> AddHandler php .php
> Of course this means you need to include the according modules and also the
> ScriptAlias directive but you can find enough information about that in the
> www and also on the documentation on http://httpd.apache.org/docs-2.0.
> 
> I hope it was helpful and btw RTFM ;-)
> 
> Paul
> 
> 
> ----- Original Message -----
> From: Toni Maatta
> To: users@httpd.apache.org
> Sent: Monday, February 03, 2003 3:11 PM
> Subject: [users@httpd] rewrite problem
> 
> 
> Hi,
> 
> How can I expand url http://www.company.com/ to
> http://www.company.com/index.xxx
> 
> I'd like to know whenever user request any .php/.pl/or so documents and
> redirect all scripts to cgi-servers. But the problem is that I don't
> know how can I match eg. .php, when there are no document name in url.
> 
> Any ideas?
> 
> -- toni
> 
> ---------------------------------------------------------------------
> 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
> 

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