How to make url canonization with Wordpress

by nava28
2 replies
  • SEO
  • |
Hi guys.

Need your help. I was trying to make url canonization but it doesn't work. I tried this one:

Options +Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://www.example.com/$1/ [L,R=301]
but when i put this one i was not able to access my blog. Later i tried

RewriteEngine on
RewriteCond %(HTTP_HOST) ^site.com
RewriteRule (.*) http://www.site.com/$1 [R=301,L]
currently i have in htaccess this code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
Can anyone give me an idea? I got stumped with this ...
#canonization #make #url #wordpress

Trending Topics