wordpress - Re-direct ".html" to "/" -
in blog (http://ordealoftheunion.com/) blog hosted on blogger , changed self hosted wordpress.org blog, lots of things (like permalinks) remained static until re-indexed google. noticed links with".html" re-directed 404 page instead of new permalink structure in wordpress. example when clicked on article old link ending in ".html" re-directed me 404 page instead of actual article (/2012/05/barack-kingfish-obama-for-president.html) no longer works, since permalinks changed article located @ (/2012/05/barack-kingfish-obama-for-president/) summarize how can .html re-direct "/" ?
many thanks
- ruslan.k
you can place rule as first rule below rewriteengine on line:
rewritecond %{request_filename} !-f rewriterule ^(.+?)\.html$ /$1/ [l,nc,r=301]
Comments
Post a Comment