I am trying to do a 301 redirect in my .htaccess from "http://example.com/article.htm k" to "http://example.com/article.htm". I've tried doing,
Redirect 301 "http//example.com/article.html k" http://example.com/article.htm
as above and and with %20 and [s] in place of the space for the k. None of these seem to work. I'm thinking the problem is because the space is after the .htm rather than before it. Any ideas on how to fix this or what the problem could be? Thanks.
You need to use Redirect as
Redirect
Redirect 301 /article.html k http://example.com/article.htm
or use RedirectMatch (to specify a regex)
RedirectMatch
RedirectMatch 301 /article.htmlsk http://example.com/article.htm
1.4m articles
1.4m replys
5 comments
57.0k users