php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22222 mod_rewrite variables change between apache and apache2
Submitted: 2003-02-14 07:25 UTC Modified: 2003-02-14 08:58 UTC
From: tthiery at yahoo dot de Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.0 OS: Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tthiery at yahoo dot de
New email:
PHP Version: OS:

 

 [2003-02-14 07:25 UTC] tthiery at yahoo dot de
Hello,

I have a problem with a different behaviour of Apache / Apache2
Two configuration:
- Apache 1.3.27 / PHP 4.3 / Win32
- Apache 2.0.44 / PHP 4.3 / Win32

with more or less the same httpd.conf configuration file (here the part which make troubles):
...
<VirtualHost io:80>
	DocumentRoot "D:/CVSCheckout/project"
	ServerName mycomputer.local
	RewriteEngine On
	RewriteRule ^/.*\.xml /system/if/xmlfile.if.php
</VirtualHost>
....
Both configuration should rewrite all .xml files to a central file, which load the xml file and output the parsed xml code in a format (i.e. HTML, PDF, Flash, ...).

No problem till I update the system to apache 2.0.44. Since then I get a "400 Bad Request" Error (IE, Mozilla). I test a while and solve the problem with this line: 
	RewriteRule ^/.*\.xml /system/if/xmlfile.if.php [PT]
but now all script variables like SCRIPT_NAME, etc. changes due to the other way of rewrite.

Ok, I could do a nasty workaround, but I hate to do this due to a bug.

I know it's perhaps not a php Bug (at least I think so) but it influence the normal php script behaviour a lot. Perhaps one of the PHP and Apache developer could solve the problem

cu

Thomas Thiery

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-14 07:28 UTC] tthiery at yahoo dot de
I did a little mistake in the description nothing on the topic
<VirtualHost mycomputer.local:80>
	DocumentRoot "D:/CVSCheckout/project"
	ServerName mycomputer.local
	RewriteEngine On
	RewriteRule ^/.*\.xml /system/if/xmlfile.if.php
</VirtualHost>
 [2003-02-14 08:58 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is mod_rewrite issue and not a PHP one, your bug report would be better served on the Apache 2 buglist then here. One tip that I can give you is to enable the most verbose logging of the rewrting logic, which may allow you to see why your previously working rewrite rule is failing.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 15:01:33 2025 UTC