PHP Website Converted to Static HTML Website - Linking Issues

I had a Dynamic PHP website that I needed to convert to a static website in order to give the client. I used wget to pull out the files and it did exactly what I needed. The only problem is that ... before (those indexed by google) do not have a file extension. I used .htaccess to get rid of the .php file extension.

So, one of my URLs will look like this: http://www.domain.com/about/

When I received the static version of the website, it changed all my links to .html

This may be good, since I could use htaccess to get rid of this file extension, and so all my links will be the same as before. Well, all the internal links on each page are linked with the .html version.

Is there any way htaccess can direct users if they go to about.html, it will take them roughly without extension? So will all my internal links work?

Or are there any other suggestions you might have on how to handle this?

Here is the wget code I'm using:

wget -k -K  -E -r -l 10 -p -N -F -nH http://www.domain.com/

How can I get this to output .php files instead of .html?

Thank!

+5
source share
1 answer

You can add this to your .htaccess:

RewriteRule ^([^\.]+)$ $1.html [NC,L]

: http://www.sicanstudios.com/how-to-remove-php-html-htm-extensions-with-htaccess/

+5

All Articles