|
View previous topic
::
View next topic
|
| Author |
Message |
varunpratap
Joined: 17 Aug 2004 Posts: 534
|
Posted: Wed Aug 03, 2005 1:01 pm Post subject: SSI include |
|
|
I m having problems with using SSI.
I m using this in .htaccess file
AddHandler server-parsed .html
AddHandler application/x-httpd-php .php .htm .html
and <!--#include virtual="menu.html" -->
in my main file
now when I use .html I just can't see the menu. it seems server is not parsing it..
but when I use .shtml I can see the menu
where is exactly the problem?
I even change
AddHandler server-parsed .html
to
setHandler server-parsed .html
it started givin me server error..
Varun Pratap _________________ My Blog with Step by Step 30 Internet Success Challenge
Internet Marketing Tips |
|
| Back to top |
|
 |
Charlie
Joined: 22 Aug 2003 Posts: 3305 Location: UK
|
Posted: Thu Aug 04, 2005 10:56 am Post subject: Re: SSI include |
|
|
Hello Varun.
I tried a similar thing a few years ago (but parsing .html as PHP - as a Google experiment)...
| varunpratap wrote: | now when I use .html I just can't see the menu. it seems server is not parsing it..
but when I use .shtml I can see the menu
where is exactly the problem?
|
To be honest, I'm a bit rusty with this, but one thing I do know, is that certain hosts restrict what you can do with .htaccess.
Some people worry that if everyone parsed .html, servers would slow down, though I suspect this is more theoretical than a practical concern, these days.
Nonetheless, I'd check with your host. To be honest, it's always best to OK this sort of thing first, even if it is possible. Hosts can get a bit twitchy about surprises of this kind.
Secondly, what's the reason for needing this? Maybe someone can suggest another solution.
Cheers,
Charlie. _________________ "Before I speak, I have something important to say."
- Groucho Marx |
|
| Back to top |
|
 |
varunpratap
Joined: 17 Aug 2004 Posts: 534
|
Posted: Thu Aug 04, 2005 12:44 pm Post subject: |
|
|
Hi Charlie,
thnx for the tip... anyways I got it working... the regular command for parsing wasnt working
I talked to my host.. and well they have allowed to us to do .htacess parsing..
Actually I m putting up a site which has rite now about 30 pages... and I know that it has potential to get big(around 400-pages). I wanted to use
SSI in menu section. So that I can add additional links and dont have to change every single html file(I have done this.. and I still regret not using SSI in my first site.. it was pain changing almost 400 pages 1 by 1)
So this time around, I m planning from advance using SSI. anyways like I said I made it to work this is exact code I used
| Quote: | AddType text/html .shtml .html .htm
AddHandler server-parsed .shtml .html .htm
Options Indexes FollowSymLinks Includes
|
Now my next problem is I can't use Php commands in my html
Addhandler server-parsed .html
so that I can use php in my html pages.
well I am also putting up content from my blog so thats a php script and a php include..
Man this gets really trouble some.. sometimes
Varun Pratap _________________ My Blog with Step by Step 30 Internet Success Challenge
Internet Marketing Tips |
|
| Back to top |
|
 |
robertb
Joined: 09 Aug 2003 Posts: 1838 Location: Columbus, OH
|
Posted: Thu Aug 04, 2005 1:01 pm Post subject: |
|
|
| varunpratap wrote: | I wanted to use
SSI in menu section. |
Don't stop there.... Try including other common areas of your pages as well with SSI; it's a real time saver. _________________ Robert
Instant Site Comments - Allow Visitors to Comment On Your Content!
EbookNiches.com - 4 PLR Ebook Packages Each Month
Learn About DropShipping |
|
| Back to top |
|
 |
varunpratap
Joined: 17 Aug 2004 Posts: 534
|
Posted: Thu Aug 04, 2005 4:19 pm Post subject: |
|
|
| Quote: | | Don't stop there.... Try including other common areas of your pages as well with SSI; it's a real time saver. |
he he he.. Ya I was thinking about it too... this time around everything is properly planned...
Tho I use dreamweaver but I don't use template facilities.. So Menu and ads Section is the one that I have to care about a lot.
Varun Pratap _________________ My Blog with Step by Step 30 Internet Success Challenge
Internet Marketing Tips |
|
| Back to top |
|
 |
Charlie
Joined: 22 Aug 2003 Posts: 3305 Location: UK
|
Posted: Fri Aug 05, 2005 11:49 am Post subject: |
|
|
Varun,
Glad to hear you got the first problem solved...
| varunpratap wrote: | Now my next problem is I can't use Php commands in my html  |
I must admit I've never tried using PHP (the old fashioned embedded way) and SSIs in the same file. I'm not sure if this possible to parse the same file for two things at once!
To be honest, I much prefer PHP as you can jump in and out of a normal HTML page (labelled .php). If you use PHP includes, as you mentioned, you have the equivalent of SSIs anyway.
All the benefits, but much easier for "us" amateurs.
Cheers,
Charlie. _________________ "Before I speak, I have something important to say."
- Groucho Marx |
|
| Back to top |
|
 |
AndyBeard
Joined: 31 May 2005 Posts: 76 Location: Poland
|
|
| Back to top |
|
 |
varunpratap
Joined: 17 Aug 2004 Posts: 534
|
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|