Forum Moderators: open

Message Too Old, No Replies

Updating Site

I am updating my site and wanted to ask some questions

         

Karan13

3:43 am on Aug 10, 2005 (gmt 0)

10+ Year Member



I am redesigning my site that i have right now and as i was going through it i was thinking, i want to try and do it right, not perfect but just wanted to make sure that i am learning how to make sure pages are designed properly and such. (If that makes any sense)

1. I currently use php files for everything. There are some sites i see out there on the web, that are .html but i know are dynamic. Is this a simple htaccess trick where they rename the page for the browser, or is there a way for .html pages to be running all these scripts. I guess can i run php code from within html, because i thought no, so what might they possibly do.

2. Meta Tags, since i include them on every page, is there a way to dynamically include them so that if i need to update it, it filters through on every page, rather than just changing each page manually.

3. I guess is there a good book out there to understand how companies run huge sites. Like microsoft, each page is generated on the fly, and im guessing they read everything from a database, and i know my site is not that big, its only like 100 pages, but i just want to learn thats all.

Thank you so much to whoever answers. I appreciate it.

icpooreman

2:03 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



for your first question if you put the line

AddType application/x-httpd-PHP .PHP .html
in you httpd.conf file you should be able to parse html files for php.

FTFlash

2:31 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



I've tried doing what you've said before icpooreman, but it never works. I've even tried editting my httpd.conf file with no luck.

I guess my webhost (GoDaddy.com) doesn't allow me to change settings like that.

So, if PHP doesn't work in HTML pages after trying several different methods, than you might want to check with your webhost.

Hope this helps!

Karan13

2:35 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



icpooreman, thank you for replying and i tried what you said, but then i realized i probably don't have access to my httpd.conf file. So i did a little web search with what you said and found out how to do it through .htaccess

AddHandler application/x-httpd-php .html .htm

And now i just rename my .php to .html or you can have another script in your .htaccess and have .php's forwarded to .html and it works. Thank you.