RewriteRule - need to use #

Discussion in 'Apache' started by ruby, Nov 4, 2007.

  1. #1
    Hi all.... we all know the hash (#) is a comment but I need to use it as follows"

    RewriteRule ^test/(.*?)$ /test#$1


    The problem is apache recognises the # as a comment so ignores the #$1

    I tried looking for the HTML code but it seems # doesn't have one I can use instead of the actual character... or does it?

    Any help appreciated.
     
    ruby, Nov 4, 2007 IP
  2. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #2
    Can't you just use the backslash to declare it as a literal character?

    RewriteRule ^test/(.*?)$ /test\#$1

    I'm not much of a programmer but I think that should work.
     
    mcfox, Nov 4, 2007 IP
  3. ruby

    ruby Well-Known Member

    Messages:
    1,854
    Likes Received:
    40
    Best Answers:
    1
    Trophy Points:
    125
    #3
    Thanks... but no doesn't seem to work, I did already try that.
     
    ruby, Nov 4, 2007 IP