IMPORTING HTML CODES FROM ANOTHER FILE |
IMPORTING HTML CODES FROM ANOTHER FILE |
Noy |
Jan 26 2009, 01:44 PM
Post
#1
|
Group: Members Posts: 6 Joined: 26-January 09 Member No.: 7,641 |
I have had this issue on my mind, and never really found a suitable solution. Figured I would try again.
I am building a new website. I am always making changes that need to be applied to all the pages. Rather than me making the changes to every single page individually, ARE THERE ANY CODES TO ADD TO A WEB-PAGE THAT WOULD IMPORT HTML CODES FROM ANOTHER FILE? So let say I upload a file "menu.txt" with the menu codes. So that anytime I make HTML changes to this file, it will automatically update all the web pages importing the codes on this .txt file. I was once accomplishing this with a banner rotator CGI script, but it's not really an option with my new server. I am open to similar creative options! |
pandy |
Jan 26 2009, 02:08 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
|
Christian J |
Jan 26 2009, 02:17 PM
Post
#3
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
I was once accomplishing this with a banner rotator CGI script, but it's not really an option with my new server. Because the server doesn't support CGI? Does it support PHP, ASP or SSI? QUOTE I am open to similar creative options! There are also ways with javascript and/or inline frames, but server-side solutions are much better. |
Noy |
Jan 26 2009, 02:21 PM
Post
#4
|
Group: Members Posts: 6 Joined: 26-January 09 Member No.: 7,641 |
With my server, in order to use the SSI, I would have to rename all pages to .shtml --- something I would like to try and avoid. A simple script that I would import HTML codes into a designated place on all pages would work great. Thanks for your help! I was once accomplishing this with a banner rotator CGI script, but it's not really an option with my new server. Because the server doesn't support CGI? Does it support PHP, ASP or SSI? QUOTE I am open to similar creative options! There are also ways with javascript and/or inline frames, but server-side solutions are much better. |
Noy |
Jan 26 2009, 02:36 PM
Post
#5
|
Group: Members Posts: 6 Joined: 26-January 09 Member No.: 7,641 |
Hi Pandy, I have been familiar with this technique for some time now. As a matter of fact, it just worked for me now for the first time. My concern is that it requires me to use the extension of .shtml -- is there any way to avoid this requirement? Noy |
pandy |
Jan 26 2009, 02:36 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
QUOTE With my server, in order to use the SSI, I would have to rename all pages to .shtml Not necessarily. You can make the server parse html files for SSI (or PHP). |
Noy |
Jan 26 2009, 02:41 PM
Post
#7
|
Group: Members Posts: 6 Joined: 26-January 09 Member No.: 7,641 |
As you can see the test worked for; http://www.rentinsouthbeach.com/test.shtml Failed for; http://www.rentinsouthbeach.com/test.html http://www.rentinsouthbeach.com/test.htm So you are saying I can still change something on my server to make this work? I am with Start Logic hosting, powered by vDeck. Perhaps you know if this change is possible from my side? QUOTE With my server, in order to use the SSI, I would have to rename all pages to .shtml Not necessarily. You can make the server parse html files for SSI (or PHP). |
pandy |
Jan 26 2009, 02:45 PM
Post
#8
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Is it an Apache server and can you use .htaccess files? If so...
CODE AddHandler server-parsed .html |
Noy |
Jan 26 2009, 02:53 PM
Post
#9
|
Group: Members Posts: 6 Joined: 26-January 09 Member No.: 7,641 |
I believe it is an Apache, but I am confirming now. I had an old .htaccess file, and edited the content to "AddHandler server-parsed .html". Then uploaded it to the root directory of the website. However, it still did not work on the .html files. Should I contact my tech support and ask if they can make the SSI work with .html files? Or as you suggested; "make the server parse html files for SSI (or PHP)"? Is it an Apache server and can you use .htaccess files? If so... CODE AddHandler server-parsed .html |
Noy |
Jan 26 2009, 03:55 PM
Post
#10
|
Group: Members Posts: 6 Joined: 26-January 09 Member No.: 7,641 |
Managed to figure it out. Thank you guys!
This also helped for anyone else out there; http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html |
pandy |
Jan 27 2009, 05:26 AM
Post
#11
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Didn't 'AddHandler server-parsed' work but 'AddHandler server-parsed-html' did?
|
Lo-Fi Version | Time is now: 19th April 2024 - 02:44 AM |