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
    Feb 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rewrite Rule To Strip Certain Characters From URL

    Hi! I am using the following rewrite rule in my .htaccess file:

    RewriteRule ^search/node/(.*)$ custom-search&searchterms=$1 [NC,L]

    The above works perfectly for my purposes, except for when special characters are entered (such as a double quote), as this causes a forbidden error. What I would like to do is strip out all characters except for letters, numbers and spaces from the $1 variable so that such errors are no longer an issue, and have been unable to do so. Can anyone tell me how this can be done? I want any characters except for letters, numbers and spaces to be stripped from the $1 portion of the rewritten URL.

    Thanks for any help you can provide!

  • #2
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any ideas?


  •  

    Posting Permissions

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