Using .html in permalinks
-
Hi, after deciding to add a blog to my site, I discovered the static pages feature of WordPress. I decided that WordPress would make a great CMS for my static pages too, so decided to transfer them to WP.
I would like to keep the same URLs, which currently have .html extensions, so was pleased to see WP’s permalink options. Unfortunately, despite turning on permalinks, and setting the custom option to /%category%/%postname%.html, WP (or mod_rewrite) doesn’t seem to convert the urls properly, and I just get a 404. It works fine when I try /%category%/%postname%/ in the browser.
My .htaccess file has been modified, and uses this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressThere is nothing else in my .htaccess file.
I tried modifying my htaccess to convert ‘*.html’ to ‘*/’, and briefly had it working, but then I changed it and I can’t get it to work now!
(I have limited knowledge of mod_rewrite, but I take it the rules above just redirect to index.php if a file or folder of the name isnt present?)
Any ideas why WP isn’t converting the URLs properly? Otherwise any ideas what to put to convert ‘*.html’ to ‘*/’ in mod_rewrite – I tried something like:
RewriteRule ^([a-zA-Z-/]*).html$ $1/
I have searched the forum, but only found things vaguely relating to problems with permalinks.
Thanks,
Chris
- The topic ‘Using .html in permalinks’ is closed to new replies.