Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Server Side Includes

Can they be only shown to certain users



7:02 pm on Jan 31, 2005 (gmt 0)

10+ Year Member

I have a number of SSI's that I wish to show to certain users and bots, is there away to have certain SSI's included dependent upon the request coming in.



6:02 pm on Feb 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Sure. If you have a list of the IP addresses of the visitors you want to show one thing to, use an SSI to call a CGI script which compares the IP address of the visitor against the list, then displays something based on the results of your test. You can do the same thing with the UserAgent string.


4:48 pm on Feb 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Some langauges like ASP do not allow conditional includes like this.

<!--#include virtual="/spider.html"-->
<!--#include virtual="/person.html"-->

Maybe you can do that sort of thing in PHP or ColdFusion.
You can probably get around this by doing it all within your code. Test for the condition, read the file and just echo it out.

Also remember you can use Iframes to show content to people but not spiders.


Featured Threads

Hot Threads This Week

Hot Threads This Month