Dynamic url not rewriting

Discussion in 'Apache' started by fotoviva, Jul 10, 2013.

  1. #1
    Hey folks

    For some reason I have some old urls which just don't want to rewrite. I have lots of others working fine but I think it may be to do with the symbols in these paths which are stopping it from working. Ideally these should be 301'd.

    I need view.asp?filter=category%20name to go to category-name

    Any ideas please?
     
    fotoviva, Jul 10, 2013 IP
  2. RoseHosting

    RoseHosting Well-Known Member

    Messages:
    230
    Likes Received:
    11
    Best Answers:
    11
    Trophy Points:
    138
    #2
    Just escape the space(%20) with a backslash "\".

    view.asp?filter=category\ name
    Code (markup):
     
    RoseHosting, Jul 11, 2013 IP
  3. ricky92

    ricky92 Active Member

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Well, you could start by posting what you have in your .htaccess, so we can have a look and find what's wrong with it.
     
    ricky92, Jul 14, 2013 IP
  4. compevo

    compevo Member

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #4
    This may also do it:
    ^view.asp?filter=(.*) /category/$1 or similar
     
    compevo, Jul 14, 2013 IP