Apache Mod Rewrite - Replace : character with another

后端 未结 2 598
失恋的感觉
失恋的感觉 2021-01-06 15:30

I\'m trying to rewrite all URL\'s that contain a \':\' in it to another character. http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words

Example:

相关标签:
2条回答
  • 2021-01-06 15:42

    Here's a link to RewriteRule.

    RewriteRule ^/some[_:]interesting[_:]info$ /some_interesting_info [L]
    
    0 讨论(0)
  • 2021-01-06 15:57

    Try these rules:

    RewriteRule ^/([^:]*):([^:]*:.*) /$1_$2 [N]
    RewriteRule ^/([^:]*):([^:]*)$ /$1_$2
    
    0 讨论(0)
提交回复
热议问题