You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Manuel Carrara <ph...@w3suite.com> on 2002/07/09 21:22:02 UTC

Re: Apache2: DocumentRoot: File instead a Directory - 2. Try

Am Montag, 8. Juli 2002 23:08 schrieb Manuel Carrara:
Hello,

obviously I'm asking the question wrong.

So I will you only tell what I want ;)

I want every request (except some ALIASes) redirected to that script. The URL 
should not be changed.

http://www.examle.com
http://www.examle.com/?foo=bar
http://www.examle.com/bar/bar/?foo=bar

Should be processed by that script. Without RegEx and significant perfomance 
lost. Apache 1.3.x can do. Should I write my own module?

I can't believe that there is no solution for my problem.

Maybe "please help" will help.

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache2: DocumentRoot: File instead a Directory - 2. Try

Posted by Manuel Carrara <ph...@w3suite.com>.
Hello Dmitry, Hello List

> It sounds good but for one thing... hm... why not using the DirectoryIndex
> "/home/example.com/index.php" instead of DocumentRoot
> "/home/example.com/index.php" directive?
Because DirectoryIndex only thells apache wich file in this directory to use 
as default index. I dont want to create all the dummy directories (ex: 
/dskjwtejkdfgkhjd) ;)

> Please, try to fix this and tell us what happens.
Nothing, but what expected. 404 for all the dummy dirs.

Example of this working Apache1.3:

See
	http://www.stimme.de/
or
	http://www.stimme.de/dfjgdkjfgsfgsdfg

All requests are pointed to that script. It works, really believe me, but 
_ONLY_ in apache1.3. How can I do this without using mod_rewrite or using a 
404 php page and sending a 200 header in _APACHE2_? Without significant 
performace lost, that means no RegEx. Maybe I have to write my own apache 
module :(

I understand that in Apache1.3 this behavior is maybe wrong, but I get used to 
it.
Apache2 do it right not to allow it, but I want to use hat can I do. That is 
the question

> ps: still if you need you php script to handle every request it's better to
> use the power of the mod_rewrite.
see up.

Regards,

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache2: DocumentRoot: File instead a Directory - 2. Try

Posted by Dmitry Medvedev <me...@rsdsoft.msk.ru>.
It sounds good but for one thing... hm... why not using the DirectoryIndex
"/home/example.com/index.php" instead of DocumentRoot
"/home/example.com/index.php" directive?

Please, try to fix this and tell us what happens.

ps: still if you need you php script to handle every request it's better to
use the power of the mod_rewrite.

Ragards,
            Dmitry.
=====================================
Developer Express inc.


----- Original Message -----
From: "Manuel Carrara" <ph...@w3suite.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, July 10, 2002 12:36 PM
Subject: Re: Apache2: DocumentRoot: File instead a Directory - 2. Try


> good day, Manuel.
good day, too and thanks for your answer.

I have included a _working_ (Apache1.3.x) configuration, there you will see:
> In fact you have provided insufficient information, for example: which
> requests should be redirected to the script
Every request ;) EXCEPT the Alias Rules, see the config

> Please, provide more comprehensive description of your needs and what you
> have at the moment (configuration I mean).
Here is a _working_ exapample of my apache1.3.x configuration

<VirtualHost *>
        ServerAlias     example.com
        ServerName      example.com

        DocumentRoot    "/home/example.com/index.php"
#>> DOCUMENTROOT IS A CGI (PHP) - FILE

        #################################################################
        # ALIASES
        #################################################################
        alias "/image/" "/home/example.com/media/image/"
        alias "/flash/" "/home/example.com/media/flash/"
        alias "/videos/""/home/example.com/media/video/"
        alias "/style/" "/home/example.com/current/style/css/"
        alias "/script/""/home/example.com/script/javascript/"
        alias "/robots.txt" "/home/example.com/etc/local/robots.txt"
</VirtualHost>

This configuration workes fine in APACHE1.3.x but not in Apache2.

You see in the configuration that every request is send to that "index.php"
file.
So every request will be handles by the script dynamically.

=======
Example
=======
You can type:
example.com/sdfghfghjdsfkjgsdhtp348efkjg3z
example.com
example.com/?ejrtetdkjfgdkfg=dkjfgdkfg

All of this requests are handled by that php-script.

The static things, such as images, css, js are catched by the Alias rules
and
served normal by apache.

example.com/image/foo.jpg       ->  apache returns foo.jpg
example.com/image/dssdfg.jpg  ->  apache returns a 404

Maybe this information are the right you need to help me ;)

Thanks,
Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache2: DocumentRoot: File instead a Directory - 2. Try

Posted by Manuel Carrara <ph...@w3suite.com>.
> good day, Manuel.
good day, too and thanks for your answer.

I have included a _working_ (Apache1.3.x) configuration, there you will see:
> In fact you have provided insufficient information, for example: which
> requests should be redirected to the script
Every request ;) EXCEPT the Alias Rules, see the config

> Please, provide more comprehensive description of your needs and what you
> have at the moment (configuration I mean).
Here is a _working_ exapample of my apache1.3.x configuration

<VirtualHost *>
        ServerAlias     example.com
        ServerName      example.com

        DocumentRoot    "/home/example.com/index.php"
#>> DOCUMENTROOT IS A CGI (PHP) - FILE

        #################################################################
        # ALIASES
        #################################################################
        alias "/image/" "/home/example.com/media/image/"
        alias "/flash/" "/home/example.com/media/flash/"
        alias "/videos/""/home/example.com/media/video/"
        alias "/style/" "/home/example.com/current/style/css/"
        alias "/script/""/home/example.com/script/javascript/"
        alias "/robots.txt" "/home/example.com/etc/local/robots.txt"
</VirtualHost>

This configuration workes fine in APACHE1.3.x but not in Apache2.

You see in the configuration that every request is send to that "index.php" 
file.
So every request will be handles by the script dynamically.

=======
Example
=======
You can type:
	example.com/sdfghfghjdsfkjgsdhtp348efkjg3z
	example.com
	example.com/?ejrtetdkjfgdkfg=dkjfgdkfg

All of this requests are handled by that php-script.

The static things, such as images, css, js are catched by the Alias rules and 
served normal by apache.

	example.com/image/foo.jpg       ->  apache returns foo.jpg
	example.com/image/dssdfg.jpg  ->  apache returns a 404

Maybe this information are the right you need to help me ;)

Thanks,
Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache2: DocumentRoot: File instead a Directory - 2. Try

Posted by Dmitry Medvedev <me...@rsdsoft.msk.ru>.
good day, Manuel.
In fact you have provided insufficient information, for example: which
requests should be redirected to the script and which need not, which
aliases should be taken into consideration when the web server should make a
desicion on what to send to the client and which need not.
Please, provide more comprehensive description of your needs and what you
have at the moment (configuration I mean).

Regards,
            Dmitry.
===================================

----- Original Message -----
From: "Manuel Carrara" <ph...@w3suite.com>
To: <us...@httpd.apache.org>
Sent: Tuesday, July 09, 2002 11:22 PM
Subject: Re: Apache2: DocumentRoot: File instead a Directory - 2. Try


Am Montag, 8. Juli 2002 23:08 schrieb Manuel Carrara:
Hello,

obviously I'm asking the question wrong.

So I will you only tell what I want ;)

I want every request (except some ALIASes) redirected to that script. The
URL
should not be changed.

http://www.examle.com
http://www.examle.com/?foo=bar
http://www.examle.com/bar/bar/?foo=bar

Should be processed by that script. Without RegEx and significant perfomance
lost. Apache 1.3.x can do. Should I write my own module?

I can't believe that there is no solution for my problem.

Maybe "please help" will help.

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org