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
    Regular Coder the-dream's Avatar
    Join Date
    Mar 2007
    Location
    Northamptonshire, UK
    Posts
    477
    Thanks
    8
    Thanked 4 Times in 4 Posts

    URL Rewriting, Changes " " to "%20" need "+"

    Hey Guys,

    I've done a search for this but can't quite find an answer, I want to use mod_rewrite in .htaccess to rewrite GET query strings. Instead of changing a space from " " to "%20" I want it to change to a "+".

    Eg...

    http://select.ly/s/?q=John%20Smith

    becomes...

    http://select.ly/s/?q=John+Smith

    On submission of a form, I know I could use JavaScript at the submission of the form to replace all the spaces with "+". But I want to do this on the server-side.

    Your help would be greatly appreciated.

  • #2
    120
    120 is offline
    Regular Coder
    Join Date
    Nov 2009
    Location
    UK
    Posts
    105
    Thanks
    6
    Thanked 15 Times in 15 Posts
    There is always plenty of idol work for the devils hands to do
    Registered Linux User 475075 : Project Honeypot


  •  

    Posting Permissions

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