Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite - remove trailiing slash

         

lsawyer

3:16 pm on Nov 8, 2006 (gmt 0)

10+ Year Member



Hi, I have a WordPress blog with the need to remove ALL trailing slashes(for SEO purposes). I can successfully remove it with hard coded links, but links that are generated by WordPress have the trailing slash. What would be the simplest way to do this with .htaccess and mod rewrites?

This is what I have now:

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

Thanks in advance!
Lucas