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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Mod Rewrite issues with non alpha chars being hex encoded

    Please help me! I am new to this, and I am trying to write a website that uses small urls (using mod rewrite)

    It's generally working, but some of my urls are hex encoding characters and leaving symbols which seem to be upsetting php (like semi-colons).

    I've seen a couple of guides on fixing this, but can't get my head around it!

    My .htaccess:

    Options +FollowSymlinks
    RewriteEngine on

    #redirect from /base/ to index page script
    RewriteRule ^base/([*]+) http://192.168.27.128/index.php?request=$1 [NE,NC]

    BUT address: http://192.168.27.128/base/This_is_o...9;s_Great!

    (note this was This_is_our_test_&_it's_Great! the non-alphas have been encoded by apache/the browser or something).

    When echoing the $_SERVER['REQUEST_URI'] I get:
    /base/This_is_our_test_list


    I added the NE thinking it would stop encoding the hex.

    New to this and first post to the forum, would be grateful for any help!

  • #2
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, the URL is showing as:

    192.168.27.128/base/This_is_our_test_list & #44;_it & #39;s_Great & #33;

    Added the spaces to show how it looks in the browser!
    Last edited by tweeksy; 11-24-2011 at 12:23 AM. Reason: hex showing

  • #3
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update

    Ok so I've realised I am being redirected to index.php via:

    ErrorDocument 404 "/index.php"

    But I still have the same problem (the symbols in the url being encoded so ! becomes a hex number & #33; (without the space between the ampersand).


  •  

    Posting Permissions

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