***newbie question***
Hi, I am trying to make my server (Apache) parse .html files
as .php.
I found this line of code:
ForceType application/x-httpd-php
placed it in an .htaccess file and uploaded it to the
directory I wanted it to work.
And it worked; my .html files are all parsed as .php.
But, apparently, so are my images, so they aren't loaded
into the pages. And something else, my css file isn't found
anymore by Netscape and Mozilla, while IE has no problem...
I'm calling my css file with @import url(all.css); in the
<style> block in the head of my .html files.
How do I make the server parse _only_ .html files as .php,
and why don't Mozilla and Netscape find the css file? (They
did before I sent the .htaccess file)
Sincerely,
--
Els
Mente humana é como pára-quedas; funciona melhor aberta. 6 5163
On Sun, 31 Aug 2003 19:24:14 +0200, Els <el*********@PLEASEtiscali.nl.invalid>
wrote: ***newbie question***
Hi, I am trying to make my server (Apache) parse .html files as .php.
I found this line of code: ForceType application/x-httpd-php placed it in an .htaccess file and uploaded it to the directory I wanted it to work. And it worked; my .html files are all parsed as .php. But, apparently, so are my images, so they aren't loaded into the pages. And something else, my css file isn't found anymore by Netscape and Mozilla, while IE has no problem... I'm calling my css file with @import url(all.css); in the <style> block in the head of my .html files.
How do I make the server parse _only_ .html files as .php, and why don't Mozilla and Netscape find the css file? (They did before I sent the .htaccess file)
Either
<Files *.html>
ForceType application/x-httpd-php
</Files>
Or just
AddType application/x-httpd-php .html
--
Andy Hassall (an**@andyh.co.uk) icq(5747695) ( http://www.andyh.co.uk)
Space: disk usage analysis tool ( http://www.andyhsoftware.co.uk/space)
On Sun, 31 Aug 2003 19:24:14 +0200 in
<message-id:bi**********@reader1.tiscali.nl>
Els <el*********@PLEASEtiscali.nl.invalid> wrote: ***newbie question***
Hi, I am trying to make my server (Apache) parse .html files as .php.
I found this line of code: ForceType application/x-httpd-php placed it in an .htaccess file and uploaded it to the directory I wanted it to work. And it worked; my .html files are all parsed as .php. But, apparently, so are my images, so they aren't loaded into the pages.
Is '.html' deliberately missing there?
ForceType application/x-httpd-php .html
I suspect that without, it's forcing _everything_ to be parsed as PHP.
And something else, my css file isn't found anymore by Netscape and Mozilla, while IE has no problem... I'm calling my css file with @import url(all.css); in the <style> block in the head of my .html files.
How do I make the server parse _only_ .html files as .php, and why don't Mozilla and Netscape find the css file? (They did before I sent the .htaccess file)
Sincerely,
AFAIK, @import() is for IE only.. use HTML:
<link rel="stylesheet" href="/css/foo.css" type="text/css" />
etc etc.
HTH =)
Regards,
Ian
--
Ian.H [Design & Development]
digiServ Network - Web solutions www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
Andy Hassall wrote: On Sun, 31 Aug 2003 19:24:14 +0200, Els <el*********@PLEASEtiscali.nl.invalid> wrote: How do I make the server parse _only_ .html files as .php, and why don't Mozilla and Netscape find the css file? (They did before I sent the .htaccess file)
Either
<Files *.html> ForceType application/x-httpd-php </Files>
Or just
AddType application/x-httpd-php .html
It works, thanks!
Can you recommend me any website where stuff like this is
explained in beginner mode? (just for future reference ;-) )
--
Els
Mente humana é como pára-quedas; funciona melhor aberta.
Andy Hassall wrote: "Ian.H [dS]" wrote:
AFAIK, @import() is for IE only.. use HTML:
@import is standard CSS1, not IE specific.
http://www.w3.org/TR/REC-CSS1#the-cascade
I used @import, so that all browsers could find the file,
except the older ones, like NN4, who would render it
completely wrong. They don't see @import, so in there, I put
all the CSS for newer browsers. Then, I'll make a <link
rel="stylesheet" href="/css/foo.css" type="text/css" />
which will be found by NN4, but overruled by @import for the
newer browsers. (if I make sure the @import is lower in the
<head> than the <link>..)
--
Els
Mente humana é como pára-quedas; funciona melhor aberta.
On Mon, 01 Sep 2003 23:19:41 +0200 in
<message-id:bj**********@reader1.tiscali.nl>
Els <el*********@PLEASEtiscali.nl.invalid> wrote: Andy Hassall wrote: "Ian.H [dS]" wrote:
AFAIK, @import() is for IE only.. use HTML:
@import is standard CSS1, not IE specific.
http://www.w3.org/TR/REC-CSS1#the-cascade
I used @import, so that all browsers could find the file, except the older ones, like NN4, who would render it completely wrong. They don't see @import, so in there, I put all the CSS for newer browsers. Then, I'll make a <link rel="stylesheet" href="/css/foo.css" type="text/css" /> which will be found by NN4, but overruled by @import for the newer browsers. (if I make sure the @import is lower in the <head> than the <link>..)
Ahh that makes sense, and clarifies my confusion.
I was confusing (myself with) "@import() is for IE only" and "older
browsers < IE4 && NN4 etc".
I knew there was a reason and a difference in the "HTML method" and the
@import() method.. I guess I should type what I mean in future.. and
more regular coffee =)
Regards,
Ian
--
Ian.H [Design & Development]
digiServ Network - Web solutions www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nel |
last post by:
Just looking for some general advice on modifying the URL for php.
I am using .htaccess to allow a web site to translate example.html to
index.php?content=example
(below)
ErrorDocument 404...
|
by: Adam King |
last post by:
Hey,
I've done the standard old trick of adding the error page line into
..htaccess which works absolutely fine if I accidently go to any file
other than .php But if I go to "doesntexist.php" I...
|
by: Taki Jeden |
last post by:
Hello everybody
Does anybody know why w3c validator can not get pages that use 404 htaccess
redirection? I set up two web sites so that clients request non-existent
urls, but htaccess redirects...
|
by: Jack Hambabo |
last post by:
Hi,
I'm searching for a php script that can find out whether the current
user (I know _SERVER will give me the name for
non-cgi php) has the right to view a specific file.
My dream is that I...
|
by: Stefan Bellon |
last post by:
Hi all!
I want to parse the contents of an .htaccess file from within PHP. The
contents of the .htaccess file looks like this:
<Files foobar.tar.gz>
AuthType Basic
AuthUserFile /foobar...
|
by: nickyeng |
last post by:
I have checked this info from apache website, and i confused with it.
Procteing System files
it said:
To run a really tight ship, you'll want to stop users from setting up .htaccess files...
|
by: jaanus |
last post by:
Here we go...
What I have been trying to do is to forward all http requests containing /cms/ to http://cms.mydomain.com/
example1: http://host1.mydomain.com/cms/init.php would be parsed from...
|
by: helimeef |
last post by:
Hi. I'm having issues trying to get .htaccess make mod_rewrite work. I have mod_rewrite setup properly (it's in phpinfo()), but it just seems to not work.
Right now I have two files, bob.html and...
|
by: Geoff Cox |
last post by:
Hello,
Using .htaccess and a linux server is it possible to give group access
to a person so that he/she can access files in several different
folders?
If yes, how is this done?!
Cheers
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |