On 2020-05-20 4:18 p.m., @lbutlr wrote:
On 20 May 2020, at 13:57, Paul <stormy22@xxxxxxxxx> wrote:On 2020-05-20 1:23 p.m., Eric Covener wrote:On Wed, May 20, 2020 at 1:10 PM Paul <stormy22@xxxxxxxxx> wrote:VirtualHost on 2.4.29-1ubuntu4.13. .conf includes : DocumentRoot "/www/mysite" /.../ ErrorDocument 404 /error/404.html The 404.html has : <link rel="stylesheet" type="text/css" href="../css/general.css"> Works perfectly for 404s at DocumentRoot level, but fails for subdirectories eg DocumentRoot/foo/bar/mypages. Error logs show: "GET /bar/css/general.css HTTP/1.1" 404 5245 "-" etc... Apache finds the text of the custom 404 at the DocRoot reference, but apparently interprets the <link rel= as being "rel" to the missing page, so does not format the text. The client "page source" shows the correct relative path.Thanks Eric, problem solved. Wrote the styles into the html. I just wanted to keep the client's browser showing the file [s]he had tried to find, rather than /error/404.html.You could also put the absolute path to the css file in the href.
Thanks. How? It does works by using an absolute URL such as <https://mysite.com/css/general.css> Maybe that's what you're suggesting? I've had no luck trying to define an "internal" "absolute path" -- as Eric wrote, the client sets a relative path, despite the html headers. (I looked at Alias with no joy, and tried (a nightmare to manage on a site with several thousand files) splattering a load of directories with symlinks.)
Again tnx for your interest, br -- Paul --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx