ok i have linked about 300 pages to page.html and i realised the thing that i want on the page is php and i cant be assed to go back and relink it all can i not just put some script on the page.html to make it automatically go strait to page.php or a way to make page.html turn into page.php ? or even a way of putting php into a .html file which i dont know if is possible ? any ideas ?
Yes, it's very easy actually If you have it as a dreamweaver site you could do a search and replace in whole site and replace "<a href="page.html"..." for "<a href="page.php"...." and that would do it. Or, a javascript redirect with 0 sec delay Or, in the .htaccess do a 301 redirect from page.html to page.php
the dreamweaver thing sounds good. how do i do that and would it still work if all the pages are in differant folders ?
Doing something wild like a Google search reveals that you can click FIND, ENTIRE CURRENT LOCAL SITE. Type in what to find in the find box. Type in what to replace in the replace box... you get the picture. I'm not sure how much of a resource hog DW is (I use basic text editors with syntax highlighting along with vim), but it also has an option to do the same in all OPEN DOCUMENTS (under the find menu as well). If your files are on a linux server, you can do this: for fl in *.html do mv $fl $fl.old sed 's/FINDSTRING/REPLACESTRING/g' $fl.old > $fl rm -f $fl.old done Code (markup): Change the extension as necessary. Comment out ("#") the remove command if you want to keep the old copies just in case. You can also do some tweaking to make php commands work in a .html file, but I recommend keeping the extensions separate. I'm just wondering how you managed to do this in 300 files and why your username is geekazoid...
My username is geekazoid because thats what my website is called and it was a mistake i didnt see untill all pages where complete which took only a few hours.
Add this line to your .htaccess and PHP will work in HTML files... AddType application/x-httpd-php .php .htm .html
Hightlight the folders/pages that you want to make the changes on. Go to find/replace, enter the current URL in the find box and the new in the replace - simple