|
Home > Archive > Web Servers on Unix and Linux > April 2004 > Download HTML Pages???
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Download HTML Pages???
|
|
| Tyrone Slothrop 2004-04-27, 9:35 pm |
| A client has a new dedicated server with
RedHat 7.3
Apache 2.0.48
Plesk 7
PHP 4.3.4
MySQL 3.23
I created a new account with mysql and php support in Plesk. The site
has lots of old files which used to require SSI's but we have since
switch to php as the scripting language. The client has resisted
changing any file names due to search engine rankings. As a result, I
need to make it so .shtml pages interpret php tags.
On their old server I simply created an .htaccess file specifying the
types and extensions and placed in the root account directory.
However, on the new server the .htaccess file did not work, so I went
to the httpd.conf file to do the same, making sure to backup any files
which were changed. I also tried tweaking the httpd.include files,
again backing them up.
Before the changes, .html would render properly but .php files would
show source. Now .html, .shtml, .php, .php3, etc. files all prompt
for a download in the browser. I restored the old conf files,
restarted Apache (and even rebooted the server), but still have the
same prompt for download. Yes, I emptied the browser cache, closed
and reopened the browser (both Mozilla and IE).
After a couple days of messing around with this, I am about to go
nuts. Anyone have any suggestions, preferably constructive? ;-)
| |
| Trent Curry 2004-04-28, 9:35 am |
| Tyrone Slothrop wrote:
> A client has a new dedicated server with
> RedHat 7.3
> Apache 2.0.48
> Plesk 7
> php 4.3.4
> mysql 3.23
>
> I created a new account with mysql and php support in Plesk. The site
> has lots of old files which used to require SSI's but we have since
> switch to php as the scripting language. The client has resisted
> changing any file names due to search engine rankings. As a result, I
> need to make it so .shtml pages interpret php tags.
>
> On their old server I simply created an .htaccess file specifying the
> types and extensions and placed in the root account directory.
> However, on the new server the .htaccess file did not work, so I went
> to the httpd.conf file to do the same, making sure to backup any files
> which were changed. I also tried tweaking the httpd.include files,
> again backing them up.
>
> Before the changes, .html would render properly but .php files would
> show source. Now .html, .shtml, .php, .php3, etc. files all prompt
> for a download in the browser. I restored the old conf files,
> restarted Apache (and even rebooted the server), but still have the
> same prompt for download. Yes, I emptied the browser cache, closed
> and reopened the browser (both Mozilla and IE).
>
> After a couple days of messing around with this, I am about to go
> nuts. Anyone have any suggestions, preferably constructive? ;-)
AddType text/html .shtml
AddHandler server-parsed .shtml
Make sure you don't have any stray AddType or AddHandler's for htm or
html. Also check any .htaccess files.
In your http.conf od you have "AllowOverride All" in there, usually in
the <Directory /> block.
--
Trent Curry - trentcurryReMoVe@rEmOvEhotmail.com
| |
| Tyrone Slothrop 2004-04-28, 9:36 pm |
| On Wed, 28 Apr 2004 06:21:40 -0700, "Trent Curry"
<trentcurryReMoVe@rEmOvEhotmail.com> wrote:
>
>
>AddType text/html .shtml
>AddHandler server-parsed .shtml
>
>Make sure you don't have any stray AddType or AddHandler's for htm or
>html. Also check any .htaccess files.
>
>In your http.conf od you have "AllowOverride All" in there, usually in
>the <Directory /> block.
Thanks for your help - we finally got the ***** thing working.
|
|
|
|
|