Timeline for How to have .htaccess display 404.html for child pages
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 7, 2018 at 14:17 | history | edited | MrWhite | CC BY-SA 4.0 |
Changed wording (less intense) and included reference link
|
Sep 7, 2018 at 0:39 | comment | added | MrWhite |
@heyycap I mention the use of the base tag in an answer to another question: webmasters.stackexchange.com/a/86458/1243 - This other question relates to URL-rewriting, but the same principle applies here. In your question, the URL is effectively being rewritten to the error document. (In actual fact, it is an internal subrequest that causes the error document to be served, but the result is similar).
|
|
Sep 7, 2018 at 0:35 | comment | added | MrWhite |
@StephenOstermiller "unadvisable" maybe a bit strong. It's OK. (Although it is better in most cases to use root-relative URLs if you are able to.) But you should be aware of some caveats... such as any relative URL that is intended to target the current document will now target the base URL. Such as in-page anchors href="#top" and href="?sortby=date" (less common) type URLs etc. These relative URLs that target the current document will need to be modified to include the full URL of the current page (which kind of defeats the point of using the base tag to begin with).
|
|
Sep 7, 2018 at 0:12 | comment | added | heyycap | Thanks @MrWhite, got it to work. Stephen how would you use a base tag to solve this problem? Maybe post another answer to my question if possible. | |
Sep 7, 2018 at 0:10 | vote | accept | heyycap | ||
Sep 7, 2018 at 0:06 | comment | added | Stephen Ostermiller♦ | Why wouldn't you advise using a base tag? I use them frequently to solve problems like this. | |
Sep 6, 2018 at 23:07 | history | edited | MrWhite | CC BY-SA 4.0 |
added 257 characters in body
|
Sep 6, 2018 at 22:53 | history | answered | MrWhite | CC BY-SA 4.0 |