I had a Dynamic PHP website which I needed to convert into a static website to give to a client. I used wget to pull the files and it did exactly what I needed. The only problem is..my links before (the ones indexed in google) have no file extension. I used .htaccess to get rid of the .php file extension.
So one of my URL's would look like this: http://www.domain.com/about/
When I got a static version of the website, it changed all of my links to .html
That could be fine, as I could use htaccess to get rid of that file extension and so all of my links will be the same as before. Well, all of the internal linking in each page is linking to the .html version.
Is there a way with htaccess to direct users if they go to about.html it will take them to about with no extension? So all of my internal linking will still work?
Or is there any other suggestions you guys might have on how to handle this?
Here is the wget code I use:
wget -k -K -E -r -l 10 -p -N -F -nH http://www.domain.com/
How can I get that to output .php files instead of .html?
Thanks!
You can add this to your .htaccess:
RewriteRule ^([^\.]+)$ $1.html [NC,L]
taken from: http://www.sicanstudios.com/how-to-remove-php-html-htm-extensions-with-htaccess/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With