...

View Full Version : php / appache wrong $_SERVER[REQUEST_URI]



oxylus
11-27-2006, 06:44 PM
Hi,


I'm facing a weird problem for $_SERVER["REQUEST_URI"]

Here is the example:

For this link
http://www.weaverappraisals.com/new/documents/document.html?xid=3
the request uri its
[REQUEST_URI] => /new/phpbase.php?_PAGE=account&mod=documents⊂=document

but i need it to be "/new/documents/document.html?xid=3"

its a missconfiguration ? can it be done from htaccess ?

I'm using mod_rewrite
RewriteRule ^documents/(.*).html$ phpbase.php?_PAGE=account&mod=documents&sub=$1

I have the same problem when i use the
Error document 404 phpbase.php

Url:
http://www.weaverappraisals.com/new/test/testx.html?xid=3

but request uri:
[REQUEST_URI] => /new/phpbase.php

Thanks,
Emanuel

ess
11-27-2006, 09:26 PM
try the following


RewriteEngine on
RewriteBase /

ReWriteRule ^new/documents/([a-zA-Z0-9_]+)\.html$ phpbase.php?_PAGE=account&mod=documents&sub=$1

for error documents try the following


ErrorDocument 400 error.php?page=error&code=400
ErrorDocument 401 error.php?page=error&code=401
ErrorDocument 403 error.php?page=error&code=403
ErrorDocument 404 error.php?page=error&code=404
ErrorDocument 500 error.php?page=error&code=500

Let's know if you need more help.
Good luck.
Ess

P.S. It never is a good idea to allow people to see your configurations. You should remove the page which echos out $_SERVER from your website.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum