Free Ringtones - Mortgages - Loan Consolidation - Myspace Comments - Mortgages

PDA

View Full Version : Need advice - change html pages to php


geomark
Oct 26th 2006, 9:54 pm
I have a fairly large site with many html pages. I would like to add geotargeting to them so it seems I need to make them php pages. But then I have to redirect them all, a very large number of redirects to point to the php version of instead of the html.

Is there a better way? If not, what is the impact of a large number of redirects?

James'78'
Oct 26th 2006, 9:59 pm
I would recomend backing up your content then installing something like phpnuke or phpplatinum. I can recomend someone if you would like, if so send a pm. I'm not a pro but I think it would be a logical solution. Please keep us posted on the solution you choose.

geomark
Oct 26th 2006, 10:40 pm
Those are cms systems, right? How does using them get my html pages to php without redirecting each one of them? Do they automate it for me?

AdamSee
Oct 27th 2006, 11:12 am
Add this to your .htaccess file:
AddType application/x-httpd-php .php .html
Every html file will be parsed by the PHP parser first. If there's no PHP inside, nothing will happen, if there is, it will run that PHP.

The alternative is a redirect from html to php, but I prefer the top solution.

Max99
Oct 27th 2006, 12:14 pm
Add this to your .htaccess file:
AddType application/x-httpd-php .php .html
Every html file will be parsed by the PHP parser first. If there's no PHP inside, nothing will happen, if there is, it will run that PHP.

The alternative is a redirect from html to php, but I prefer the top solution.

arggh man i wish i had known this before i did individual all my pages

subhayu.in
Oct 27th 2006, 12:33 pm
I dont have so much idea...but i can show u a website which wasin html and now its in php.

geomark
Oct 27th 2006, 7:23 pm
Adding the type handler to .htaccess works great, thanks!

I knew this technique already from the time I embedded a newsfeed in another site, but I forgot all about it. Thanks for the reminder.

carl_in_florida
Nov 1st 2006, 7:33 am
Add this to your .htaccess file:
AddType application/x-httpd-php .php .html
Every html file will be parsed by the PHP parser first. If there's no PHP inside, nothing will happen, if there is, it will run that PHP.

The alternative is a redirect from html to php, but I prefer the top solution.

This is why I love DP

Thanks for this info. I don't need it right now but I never knew this. Rep to you!

Eskarina
Nov 1st 2006, 7:57 am
I don't understand all that parser redirect stuff :P

...but if you still need to convert html to php ---> this is a good tool & very quick & easy to work

http://www.easyhtools.com/ehsdescription.html

Please bear in mind I know nothing about php! but just incase this may be of some use - out of curiosity some months back I converted some html files with it, to php, and got a friend to see if the looked ok. and it worked great :)