PDA

View Full Version : Server side includes


Albroun
23-07-2003, 07:45/07:45AM
Does anyone know if using SSI can cause problems for search engine spiders?

There is one other aspect to this question. If I am dealing with a site which does not currently use SSI, I will have to convert the filenames to .shtml to allow for this.

I presume such conversion will result in broken links and therefore damage existing search engine placement for the site in question. Is there a good workaround solution?

Thank you

JuniorHarris
23-07-2003, 11:56/11:56AM
SSI will not create any problem for the engines...as it occurs server side, before output is delivered to client.

vinyl-junkie
23-07-2003, 11:57/11:57AM
I use SSI in quite a few places on my website without any search engine problems. If you're thinking about making any changes to the URL's, here (http://www.ihelpyouservices.com/forums/showthread.php?s=&threadid=10358&perpage=10&pagenumber=1) is an ongoing thread on redirecting your old pages so visitors can find them and the new pages can get indexed.

Hope this helps. :)

Albroun
23-07-2003, 12:41/12:41PM
Thanks - to clarify things all I have to do is add the following code to each of my old html pages (after removing everything else from them), and the pages in qustion will retain their current search engine rankings without any problems?:

<%

strNewUrl = "http://www.mydomain.com/whatever.shtml"

Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", strNewUrl

%>

<html>
<head>
<title>Object moved permanently</title>
<meta name="robots" content="noindex">
</head>
<body>
<h1>Object moved permanently</h1>
This object has been relocated to
<a href="<%=strNewUrl%>">here</a>.
</body>
<html>

vinyl-junkie
23-07-2003, 13:57/01:57PM
Originally posted by Albroun
Thanks - to clarify things all I have to do is add the following code to each of my old html pages (after removing everything else from them), and the pages in qustion will retain their current search engine rankings without any problems?:

snip> From my understanding of everything that's been discussed here in the forums, that is correct. Bear in mind that it might take a couple of months for Google to pick up the new page URL's, but this seems to be a fairly painless way to switch pages over.

urbanlady
24-07-2003, 01:08/01:08AM
You don't have to rename all your pages to shtml to use server side includes. You can use them in pages ending with .htm and .html. It's all in how you set up the server side include.

All you have to do is put the following lines in your .htaccess file.
AddHandler server-parsed htm
AddHandler server-parsed html
This tells the server to look for server side includes in files ending with .htm and .html


You can also set this in CPanel if your host uses that. This works for Apache and something similar should work for most web servers.

I use SSI that way on my site www.digitalphotoartistry.com to show Google Ad Sense ads.

Nancy Kramer
Webmaster http://www.digitalphotoartistry.com

ihelpyou
24-07-2003, 01:46/01:46AM
Welcome to the forums urbanlady! :hi:

Albroun
24-07-2003, 05:14/05:14AM
All you have to do is put the following lines in your .htaccess file........

Apologies - no idea what this means. Do I have to have control over how the server is configured to be able to do this? A problem is that I dont always have any access to or control over server configuration.

Thanks