Forum Moderators: mack
I have searched this site for info on using PHP includes or SSI for repeated content, and found many threads
Can't quite get to the bottom of it, so here are my questions...
I have a site, around 400 pages (plus a small message board but that isn't included in this discussion), and am adding about 1 page per day
Obviously, I need to use some form of includes to make site-wide changes more easily - have previously been using NoteTab Light to search and replace them all at once, but this is clearly the wrong way to go about it.
All of my pages are .html and I am loathe to change them .shtml or .php
The way I see it, the options are:
1. use SSI and change the .htaccess file to parse all .html files for SSI
2. use PHP include and change the .htaccess file to parse all .html files for PHP
3. use SSI and the x-bit thingy
4. iframes - clearly the wrong option for search engines
5. continue batch editing in notetab
Can anyone advise?
I am concerned about the download/display hit by making all .html files get parsed for either SSI or PHP, but don't know if this is really a major issue or not? I am on a shared server, so don't know if i can do the x-bit thing.
Also, if I change the .htaccess in my root directory, do i need to add one to each subdirectory (of which there are hundreds!) or does it flow down?
Using php includes rather than SSI includes easily allows you to incorporate other php scripting into your site down the road, should you need to. SSI is much more limited.
I've been doing a lot of sites lately that have either user logins, or admin logins, or both. I use conditional logic in my nav: If the user is not logged in, display the log in link. If the user is logged in, display the log out link. If the Admin is logged in, display a link to the main admin page. And so forth.
Basically, parsing all your .html files for SSI allows you to do a very limited number of things. Parsing for php allows you to do nearly anything. The server hit is the same either way. So why use SSI includes when php includes are just as easy and allow for so much greater flexibility down the road?