replaceing % and spacing in between words in title with Hyphen in mod_rewrite

Discussion in 'Apache' started by alibak, Oct 1, 2008.

  1. #1
    hello, could someone be kind enough to let me know what code I'd need to place in mod_rewrite in order to replace % and spacing in between words in title with Underscore or Hyphen

    so if a title of a file is /The Title/ and in browsers it shows as /The%20Title/

    I'd like to remove the % and place instead /The-Title/

    I know that's doable in mod_rewrite.... but I don't know how.

    Please let me know.
    thanks.

    Ali
     
    alibak, Oct 1, 2008 IP
  2. alibak

    alibak Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    any suggestions please?
     
    alibak, Oct 1, 2008 IP
  3. alibak

    alibak Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Is there such a thing as a code for mod_rewrite for this stuff?
     
    alibak, Oct 2, 2008 IP
  4. alibak

    alibak Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    the following:

    --------
    Is ([0-9a-zA-Z.'_\-]+) secure? After leting some extra craracters in, all the URLs started working.

    ([^.]+) also works, and ([0-9a-z.'_\-]+) does when it ends with [NC].
    ---------
    was mentioned in the tutorial of the apache in this forum....

    I'm trying to get rid of %20 that shows up instead of space!
    but I tried all combinations of such things .. and nothing's doing it!

    can someone please give me a line of code please that would work for the whole site and not just for one component's category and product and item! (component of joomla in this case ...)

    Thanks
     
    alibak, Oct 2, 2008 IP