Re: <link> to a css file requires .css ???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just use following .htaccess rewrite rule
RewriteRule ^some.css$ some.php
and this is the perfect solution.


On Mon, Aug 17, 2009 at 3:14 AM, Adam Shannon <adam@xxxxxxxxxxx> wrote:

> On Sun, Aug 16, 2009 at 4:37 PM, Daniel Kolbo <kolb0057@xxxxxxx> wrote:
>
> > Hello,
> >
> > I realize this is more of an html question than a php, but I was hoping
> > someone here would know what's going on.
> >
> > I am linking to a stylesheet and it is requiring me to use *.css
> > extension. I want to use a .php extension (and have the php engine
> > generate css). However, whenever i use a .php extension the link tag
> > does not seem to work.
> >
> > This works!
> > <link rel="stylesheet" type="text/css"
> > href="http://localhost:8080/some.css"; />
> >
> > This doesn't work but I don't understand why not???
> > <link rel="stylesheet" type="text/css"
> > href="http://localhost:8080/some.php"; />
> >
> > The page http://localhost:8080/some.php displays the css exactly the
> > same as http://localhost:8080/some.css
> >
> > Why can't I link to a css file by using a different extension?
> >
> > Thanks in advance,
> > dK
> > `
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> Oh, I think it's part of the spec. You could always use .htaccess rules to
> parse .css files as .php, this will keep search engines happy and browsers
> happy as well.
>
> --
> - Adam Shannon ( http://ashannon.us )
>



-- 
Devendra Jadhav

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux