• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Server Side Includes

New Here ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

Im trying to insert a server side include into Dreamweaver CC without success.  Is this feature working or not?  I do have an option to insert a server side include but when trying to add it to my page is not working.  Any suggestions?

TOPICS
Server side applications

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2017 Mar 09, 2017

Copy link to clipboard

Copied

Depending on the type of include you're using, your pages that the includes are being written into will need to have the correct file extension (.php or .shtml for example), do they?

Do you have a local testing server installed and is it running?

Have you defined a site in DW?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2017 Mar 17, 2017

Copy link to clipboard

Copied

-I do had the defined site in place already.

-My entire website extension is .html

-What do you mean .shtml extension?  Do I just save the content that I want in the server side with the .shtml extension?

- I do not have a local testing as I am able to upload the page in a testing server and see if the SS is running or not.

- I tried installing the server side behaviors through the extensions but these do not work with dreamweaver 2017.

I can't believe that Dreamweaver remove this feature!  I have  a huge website that I am still managing with Expression Web just because I have many server side includes in place and cannot migrate it to Dreamweaver because I am afraid that the server sides will not work.

Your help is greatly appreciated.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

If you are using PHP includes, the file must have a .php extension in order for the includes to function correctly...

Creating a website using PHP Includes

SSI includes will use the .shtml extension and re written slightly differently...

SSI: The Include Command


To get the most out of DW while developing sites with server side includes, you'll want to get a local testing server installed. I personally use XAMPP from here:

XAMPP Installers and Downloads for Apache Friends

This is how you set it up to work with DW:

How to set up a testing server in Dreamweaver

The old server behaviors extension is pretty much garbage at this point. The behaviors use code that is extremely outdated and will not function if your server has PHP7 or later installed. Rather than updating the behaviors, Adobe relies on third party developers to carry those behaviors forward. DMXZone is one company that creates an updated version of those behaviors, if you have a budget to pay for the extension.

I've never touched Expression Web and know nothing about the code produced there or whether it will function when pulled into a DW site. One of the other contributors here should have a better idea about that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

Jon. Thank you so much for your answer.  I got it working THANK YOU!

Now the the problem I have is that the main file where the server side include is added needs to be saved with an .shtml extension.  This website is already indexed in Google and I would not want to change all these files to a .shtml as I will lose my rankings etc.

Is there a code that I can add to the .htaccess file so that I can keep the files with .html extensions as is and be able to add the server sides?

Your assistance is greatly appreciated. 

Regards,

Irmarie

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

You should talk to your hosting company to make sure it's OK for you to force the server to parse .html as .shtml, but it should be technically doable.

I've personally never done it before, so I have no personal experience or warnings I can offer. A quick Google search gave this as one of the first options:

Comprehensive guide to .htaccess- Enabling SSI Via htaccess

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

LATEST

Jon thanks for your reply.  I was able to manage this issue by adding a code into the .htaccess file.  All is working well.

Have a nice day!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines