[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-developers] Parsing HTML files
- Subject: RE: [cobalt-developers] Parsing HTML files
- From: "Andy Brown" <andy.brown@xxxxxxxxxxxxx>
- Date: Mon Oct 28 05:27:00 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
<snip>
> I dont think you know what your trying to do?
>
> I think we need more info to understand .. cause Im confused
</snip>
(Sorry dave, It makes perfect sense, read the subject line again, parse .htm extensions using php)
<snip>
> > I am trying to make php parse all .html files as well as
> .php files. I
> want to do this by adding a line in the section that is automatically
> created...
> >
> > # BEGIN WebScripting SECTION. DO NOT EDIT MARKS OR IN BETWEEN.
> > AddType application/x-httpd-php .php4
> > AddType application/x-httpd-php .php
> > # END WebScripting SECTION. DO NOT EDIT MARKS OR IN BETWEEN.
> >
> > Can anyone tell me where I can find the code that inserts
> this text into
> the /etc/httpd/conf/vhosts/siteX files?
</snip>
On the RaQ4 its added by:
/usr/lib/perl5/site_perl/5.005/Cobalt/Vsite.pm
Then add the lines:
687:
print HTCTMP "AddType application/x-httpd-php .htm\n";
print HTCTMP "AddType application/x-httpd-php .html\n";
Change line 701 to this:
if (/^AddType application\/x-httpd-php\d* .*/) {
(Note the .* instead of .php so that it matches all the new entries)
Then go into the GUI, switch off php then switch it back on for the site you wanted and those lines will be added to the vsite entry.
Hope that helps!
BUT, something i've found from doing this, is that .htaccess password protected directories don't work anymore :( I haven't yet found a solution!!
Regards,
Andy
andy@xxxxxxxxxx
http://www.raqpak.com <-- Unofficial FAQs and PKGs