Forum Moderators: phranque
www.mysite.com/thiscat/thispost
to
www.mysite.com/thiscat/thispost.html
The closest I've come to is
RedirectMatch 301 /thiscat/([a-zA-Z0-9]+/.html) /thiscat/$1.html (I know this code doesn't currently work) I'm not quite sure how to exclude pages that have already been redirected.
Any help would be greatly appreciated.
Cheers,
To be sure, a redirect ends the current HTTP transaction and the browser makes a new request for the new URL. Why you would be redirecting a short URL to a longer URL is unclear to me. That's why I suspect you might want a rewrite; when the browser asks for /page, the server fetches the 'page.html' file from the server.
Please clarify exactly the requirements, especially concerning whether a redirect or rewrite is required.
I'm trying to preserve any external links - google, etc.
The reason behind having '.html' at the end of the new site is because Wordpress seems to have a fit when using the permalink structure '/thiscat/thispost', unless i have something like 'html' on the end
Thanks for your help
And not to de-rail the current discussion, but don't forget to check out this thread [webmasterworld.com] on speeding up your WP rewrite code (after the current problem is dealt with).
Jim
This problem cropped up when I changed the default permalink structure to 'category/postname'
Wordpress would give a URL such as 'www.mysite.com/category/news/newsitem'
I managed to get rid of 'category' from the url but this forced me to add '.html' or else suffer an internal server error
This tidies up Wordpress permalinks quite nicely. here is a link: [wordpress.org...]
Thank you so much, I am flash designer by profession so all apologies if i sound out of my depth.
Cheers,