Advertisement
EtienneDupuis

URL Canonicalization - .htaccess (Apache)

Mar 29th, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. rewriteengine on
  2.  
  3. #Canonicalization
  4. RewriteCond %{HTTP_HOST} ^domain\.com [NC]
  5. RewriteRule ^(.*) http://www.domain.com/$1 [R=301,L]
  6.  
  7. #URL redirection - Making better URLs
  8. RewriteRule this-url-is-better index.php?id=bad-url-12
  9.  
  10. #Custom Error Page
  11. Error Document 404 /404.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement