The pages are being found but the reference to the stylesheet is
broken, they’re rendering with no styling. The only exception is the
homepage which is fine. What am I missing?
Btw, all relative links use “my_page” instead of “my_page.php”.
If you don’t see the stylesheets, the first place to look is the base
HREF. Most likely, Apache is trying to construct that path based on
the assumption that your tail-less filename is really a folder. If you
script your page to automatically write a base href tag based on the
real folder that file is found in, you should be all set.
Walter
On Jul 12, 2010, at 1:23 PM, Todd wrote:
I’m having a moment of brain lock. I’ve done this before without
issue but I’m choking on it in a big way this time.
I’ve removed the php file extension and forced a trailing slash to
change this:
The pages are being found but the reference to the stylesheet is
broken, they’re rendering with no styling. The only exception is the
homepage which is fine. What am I missing?
Btw, all relative links use “my_page” instead of “my_page.php”.
Can the base href be added to the htaccess file? Btw, this is a static
site that uses includes and all the files live in the site root, no
sub-directories if that matters.
T.
On Jul 12, 2010, at 12:29 PM, Walter Lee Davis wrote:
If you don’t see the stylesheets, the first place to look is the
base HREF. Most likely, Apache is trying to construct that path
based on the assumption that your tail-less filename is really a
folder. If you script your page to automatically write a base href
tag based on the real folder that file is found in, you should be
all set.
What is in the includes, and what part of the site is static?
I don’t know exactly how you can set the base href in an htaccess, but
that’s such a wild plug-in that I imagine almost anything is possible.
Take a look at setting Apache Environment variables using htaccess and
see if you can find the right one to modify and the syntax to do so.
Can the base href be added to the htaccess file? Btw, this is a
static site that uses includes and all the files live in the site
root, no sub-directories if that matters.
I found one possible solution and that’s to add …/ to all script and
stylesheet paths. Not sure if this is the most elegant or efficient
approach but it works.
I’ll have to look in the Apache docs for other options.
T.
On Jul 12, 2010, at 1:11 PM, Walter Lee Davis wrote:
What is in the includes, and what part of the site is static?
I don’t know exactly how you can set the base href in an htaccess,
but that’s such a wild plug-in that I imagine almost anything is
possible. Take a look at setting Apache Environment variables using
htaccess and see if you can find the right one to modify and the
syntax to do so.
Can the base href be added to the htaccess file? Btw, this is a
static site that uses includes and all the files live in the site
root, no sub-directories if that matters.