Hi all
I am using mod_rewrite to tidy up the urls and to hide the php extension of the files. I have now renamed a few of the files and would like to inform the engines(Google) that the file is now permanent.
The problem I am having is that I wish for the new file name to be shown in the url but with the html extension as apposed to the php extension.
The original file is foo_old_file.php
the new file is foo_new_file.php I want the url in the address to read foo_new_file.html which doesn't exist.
The code I am using is
RewriteRule ^foo_old_file\.(php|html)$ [nc]
RewriteRule ^/?(.*).html$ $1.php
The url in the address reads .
The last rule obviously changes the extension. If I only include the filename and not the full URL then it just shows the orignal file name. If I put the rule after the extension rewrite rule it doesnt find the file (again obviously)
I have not included the permanent switches as I am only testing at this stage.
Also the urls are examples.
Any help is appreciated.
TIA
Mick
mymapofseychelles
eWOC
LookandBookIt
Rotography
I am using mod_rewrite to tidy up the urls and to hide the php extension of the files. I have now renamed a few of the files and would like to inform the engines(Google) that the file is now permanent.
The problem I am having is that I wish for the new file name to be shown in the url but with the html extension as apposed to the php extension.
The original file is foo_old_file.php
the new file is foo_new_file.php I want the url in the address to read foo_new_file.html which doesn't exist.
The code I am using is
RewriteRule ^foo_old_file\.(php|html)$ [nc]
RewriteRule ^/?(.*).html$ $1.php
The url in the address reads .
The last rule obviously changes the extension. If I only include the filename and not the full URL then it just shows the orignal file name. If I put the rule after the extension rewrite rule it doesnt find the file (again obviously)
I have not included the permanent switches as I am only testing at this stage.
Also the urls are examples.
Any help is appreciated.
TIA
Mick
mymapofseychelles
eWOC
LookandBookIt
Rotography