Score:1

how to write 301 redirect by checking an special character from the url using htaccess?

lr flag

I have few urls contain some special characters like below

www.abc.com/archive/category/コレクション-帯-袋帯
www.abc.com/archive/category/お役立ち情報

I want to write .htaccess to handle this redirection.

I tried this way but its not working

RewriteCond %{THE_REQUEST} ^.*\コ [NC]
RewriteCond %{THE_REQUEST} ^.*\お [NC]
RewriteRule ^(.*)$ https://www.asterdmhealthcare.com/$1 [R=301,L]

How can i do this? Can someone please help me in this?

Score:0
lr flag

I managed to do this redirection by writing a RewriteRule only.

RewriteRule ^.*コ.* https://www.example.com/$1 [R=301,L]
RewriteRule ^.*お.* https://www.example.com/$1 [R=301,L]

this lines did the work

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.