View Full Version : Upload after a template change

09-19-2009, 04:21 PM
Does anyone know if there is a way to upload all affected pages when making a template change. It is a pain to have to sync almost the entire site just because one word was changed in the template

09-19-2009, 04:48 PM
That's the problem with templates. If you have over 10 pages I'd advise you to use 'includes' either as well as or instead of templates.

09-20-2009, 06:26 PM
The problem with includes is, unless something has changed, they do not work with html. I can change all of the pages to .php or .asp but that woul probably result in a lot of search engines pointing to old pages. If you know of a way to use includes with html pages please advise.

09-20-2009, 06:44 PM
if you rename pages, you can use a 301 redirect in your .htaccess file to point the old links to the new files. Also, with some server configurations, you can tell the server to process html files as php.

09-20-2009, 08:04 PM
Thank you for the suggestion. I had previously looked at changing the .htcaccess file, but I am not comfortable with redirecting so many pages. I know that I don't have a lot of options so I may have to. I will probably wind up changing the template to create php pages instead of html pages and manually. Although it will be time consuming, the advantage of that is total controll within dreamweaver. Any changes or deletions will be reported by dreamweaver's file control.

I will still be looking for a better solution

09-20-2009, 08:12 PM
I found these suggestions here: http://www.webmasterworld.com/forum88/5215.htm

1) Do not name your.php files ".php". Keep the names and add this line to your .htaccess file.

AddType application/x-httpd.php .html

This causes all.html files to be fed to.php.

If this doesn't work for you, a mod_alias or mod_rewrite might be offer a solution.

2) mod_alias:

redirectMatch 301 ^/(.*)\.html$ http://www.yourdomain.com/$1.php

This redirects the user's browser (and GoogleBot) to the.php-page when they request the.html page. to avoid unnecessary redirection change all internal links to point to the.php-files. redirection is overhead so the AddType solution might be better.

3) mod_rewrite:

RewriteEngine On
RewriteBase /
RewriteRule ^/(.*)\.html$ /$1.php