Forum Moderators: phranque
Change from: http://www.site.com/web-page.html
Change to: http://www.site.com/web-page/ http://www.site.com/web-page/ http://www.site.com/web-page.html
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
http://www.site.com/web-page.html http://www.site.com/web-page/
RewriteEngine on
RewriteBase /
#
# Externally redirect direct client requests for old .html-extension URLs to new extensionless URLS
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/?#\ ]+/)*[^.?#\ ]+\.html\ HTTP/
RewriteRule ^(([^/]+/)*[^.]+)\.html$ http://www.example.com/$1/ [R=301,L]
#
# Index URL and hostname canonicalization redirect rules (if any) must go here (in that order).
#
# Internally rewrite requested extensionless URL to .html file if the .html
# file exists and no directory physically exists at the requested URL
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(([^/]+/)*[^./]+)/$ /$1.html [L]
#
# BEGIN Enhanced WordPress
RewriteCond $1 !(^index\.php|\.(gif|jpe?g|png|ico|css|js))$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php [L]
# END Enhanced WordPress