Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-27-2006, 05:44 PM   PM User | #1
oxylus
New to the CF scene

 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
oxylus is an unknown quantity at this point
php / appache wrong $_SERVER[REQUEST_URI]

Hi,


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

Here is the example:

For this link
http://www.weaverappraisals.com/new/...ent.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/...stx.html?xid=3

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

Thanks,
Emanuel
oxylus is offline   Reply With Quote
Old 11-27-2006, 08:26 PM   PM User | #2
ess
Regular Coder

 
Join Date: Oct 2006
Location: United Kingdom
Posts: 865
Thanks: 7
Thanked 29 Times in 28 Posts
ess will become famous soon enough
try the following

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

Code:
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.
ess is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:59 PM.


Advertisement
Log in to turn off these ads.