Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •