user930026
user930026

Reputation: 1657

redirect using htaccess, if a url contains special character

I want to do permanent redirect using htaccess. For eg :- Redirect permanent /presskit http://example.com/ works fine. But the problem is if it contains special characters, redirect does not works. Redirect permanent /content/how-aaa-loneliness%3A-being http://example.com/

Upvotes: 1

Views: 1105

Answers (1)

Gerben
Gerben

Reputation: 16825

Redirect permanent "/content/how-aaa-loneliness:-being" http://xxx.com/

Apache already removed the %-encoding for you, so just add the normal character, optionally adding quotes.

The old URL-path is a case-sensitive (%-decoded) path beginning with a slash.

Upvotes: 1

Related Questions