PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hi all,
i have a html file i have upgraded to php for use with more functions, but i have php include connecting to the file in around 30-40 files. with this i have written in my .htaccess file the following 3 lines
RewriteEngine On
RewriteRule ^include/oldfile\.html$ /include/newfile.php
RewriteRule ^include/oldfile\.html/$ /include/newfile.php
but it still only includes the old html file rather than the new file. is there anything i have done wrong here or another piece of code i could use once? or will i just have to manually edit all my include calls to .php rather than .html?
thanks
Calls to include() do not make a request to the server - that is why no redirect occurs. You could sym-link it, or you could just not be lazy and include the correct file.
ok thanks for the reply, i'll just change them manually
yes html into php as in the html file i have only my <body> tag so that i can easily change the colours of my whole site by changing that single file, i have created a php colour theme changer though and need the file to be php.
i will go through and change them all, thanks anyway