BACKGROUND
According to my experience when my ubuntu workstation is configured on domain with active directory, the user name created for me was according to the following pattern.
domain_nameuser_name
Using the userdir extensions of apache on linux will require to use user name in the URL in order to access public_html in the home directory.
http://localhost/~domain_nameuser_name
PROBLEM A:
Chrome converts all the backslash '' characters in the URL to forward slash '/' and the resultant url becomes as under that is totally different and always results Not Found.
http://localhost/~domain_name/user_name
Firefox on the other hand does not convert back slash to forward slash so http request to intended target is served by web server.
Common solution is to encode back slash in %5C.
PROBLEM B:
If we use a similar path (containing in path) in CSS @import construct, the import process of css file as HTTP Get Request is failed by reporting 404 error and the URL reported in the 404 error miss the presence of altogether. It means is removed from the URL before to invoke GET request against it.
This behavior is common in Firefox and Chrome. But they have uncommon solutions
Firefox needs escaped back slash to work in css import process.
@import url("http://localhost/~domain_name\user_name/path/to/css");
Chrome as usual needs an encoded back slash solution.
@import url("http://localhost/~domain_name%5Cuser_name/path/to/css");
- What is the unified solutions to deal with in URL?
- Is there a way to avoid a to appear in user name?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…