Apache Mod Rewrite - Replace : character with another

后端 未结 2 630
失恋的感觉
失恋的感觉 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:57

    Try these rules:

    RewriteRule ^/([^:]*):([^:]*:.*) /$1_$2 [N]
    RewriteRule ^/([^:]*):([^:]*)$ /$1_$2
    

提交回复
热议问题