11
3
We want to rename our *.html
files to *.php
but (sadly enough) have not enough knowledge to do it with a cmd prompt command and/or batch file.
The problem is that each file is in separate folder –
and I am talking about 750+ different folder names.
Using wildcards for the files I know is the *
but using also a wildcard for folders is unknown to me.
We probably need to use the FOR
command (in Command Prompt),
but there I am stuck.
Folder structure we use is:
parent-folder/child-folder/grandchild-folder/file.html
for example:
games/A/game_name/file.html
games/B/game_name/file.html
games/C/game_name/file.html
and so on.
The parent folder is the same for all files; the child & grandchild folders are different for most files.
After renaming these files to *.php
I assume the following in the .htaccess
will make a permanent redirect.
RedirectMatch 301 (.*)\.html$ http://oursite.com$1.php
Soandos, Chapeau !!!!!!!!!!!! Many thanx from this side, works like a charm. – Charles – 2012-03-21T11:31:56.157
@Charles, if this solved your problem, please click the check mark, so that everyone else that sees it will know it worked. Welcome to SuperUser. – soandos – 2012-03-21T11:33:07.570