Relative links get rewriten in Deamweaver Templates

Here was the problem. In your template you have some links like <a href="images/photo.jpg">. When you save your template Dreamweaver places the template in a directory named Templates on the root. When this happens Dreamweaver took the liberty to rewrite all of your links to something like this <a href="/Templates/images/photo.jpg">. You could see how frustraing this would be since you don't want to keep your images inside the Templates folder. The quick solution was to make urls that reference the root of the server like this <a href="/images/photo.jpg">. This still created problems when using php includes.

I just updated Dreamweaver to version 8.0.2 and there is not an option to not rewrite document relative paths. From your manage sites menu select a site to edit. In the bottom of the left column click on templates. You will want to then uncheck the checkbox that says "Don't rewrite document relative paths".

Leave a Reply

You must be logged in to post a comment.