View Full Version : changing html to php
ponygirl
2007-12-09, 11:34 PM
I didn't know where to put this but I figured someone in here could help me :)
I can't believe I didn't think of this before I started all this work |banghead| but I'm looking at changing just my index/main pages on my LL from html to php and wondered if anyone has done this & what they did about their link trades? I also have recips pointing to main.html, so what would be the best way to redirect that to the .php?
thanks for any input!
:)
Beaver Bob
2007-12-09, 11:44 PM
you can run php pages as .html by adding this line to you .htaccess or apache config.
AddType application/x-httpd-php .php .html
ponygirl
2007-12-10, 08:37 AM
you can run php pages as .html by adding this line to you .htaccess or apache config.
AddType application/x-httpd-php .php .html
so that would allow me to run php script on an html page, right?
What if I had a script that generates the page as .php and I can't change that (or at least can't figure out how I could lol)
Useless
2007-12-10, 08:54 AM
so that would allow me to run php script on an html page, right?
What if I had a script that generates the page as .php and I can't change that (or at least can't figure out how I could lol)Are you saying that it creates a .php page? If so, you could search the script for 'php' and eventually you'll discover where it applies the extension. It may even be in the config file.
Simon
2007-12-10, 09:42 AM
And for a convoluted workaround, if you can't for some reason get the script to create/use .html extensions, you can let it generate the index.php page and then you can use a PHP include statement to pull the contents of that page into your index.html page. If the script builds exactly the page you want, this could be the complete contents of your index.html page on your server:
<?php include ('index.php'); ?>
:)
Preacher
2007-12-10, 10:46 AM
And for a convoluted workaround, if you can't for some reason get the script to create/use .html extensions, you can let it generate the index.php page and then you can use a PHP include statement to pull the contents of that page into your index.html page. If the script builds exactly the page you want, this could be the complete contents of your index.html page on your server:
<?php include ('index.php'); ?>
:)
Or just plop down the php page with an ssi include, then your index can be in shtml, and set html pages to run ssi includes in your htaccess.
ponygirl
2007-12-10, 10:58 AM
Or just plop down the php page with an ssi include, then your index can be in shtml, and set html pages to run ssi includes in your htaccess.
ok, now you guys are getting too technical for me |loony|
I think I will try Simon's runaround...oops, I mean workaround :D and see what happens. Thank you Bob, Simon, UW & Preacher |blowkiss|
ponygirl
2007-12-11, 07:51 PM
just FYI - you were all right!!
I used the php include, and added BBob's line into my htaccess, and by golly, it all worked |bananna||bananna|
still tweaking things, but BIG thanks guys! :)
T Pat
2007-12-11, 08:17 PM
You've been a busy little girl:D
I love the BlinkList concept|thumb
ponygirl
2007-12-11, 11:55 PM
thanks for your support TPat!! :)
now I'm gonna go dream in css lol
Preacher
2007-12-12, 02:04 PM
I like that idea as well. :)
That's actually how my blog started out, as the index of my linklist. I have no idea why I seperated the two (this is probably 2-3 years ago) but I keep trying to convince myself to combine the two again.
blogman
2007-12-15, 02:40 PM
Do you have ssh access to your account ?
vBulletin® v3.8.1, Copyright ©2000-2026, Jelsoft Enterprises Ltd.