You are not logged in.

#1 2023-06-13 23:52:03

pradtf
Member
Registered: 2009-06-10
Posts: 149

SOLVED accessing a webpage via softlink

i have a 'site' buried deep within a main site:
http://towardsfreedom.com/ictvity/ethology/fireworks/
(there is an index.html)

which i link to using
www.towardsfreedom.com/ff

on my server the ff points to the correct place:
ff -> ictvity/ethology/fireworks

though technically there should be a trailing forward slash:
www.towardsfreedom.com/ff/

everything seems to work fine on linux and windows machines, but i had someone on an imac and iphone saying she had to put in the trailing slash or she couldn't access it. is it possible that her browsers don't work the same way linux and windows do? (i've heard that firefox and safari sometimes ignore certain things.)

i tried linking to the index.html directly
tt -> ictvity/ethology/fireworks/index.html

but then
www.towardsfreedom.com/tt

gives the page, but for some reason the image doesn't show even though it is correct in the html code.
[EDIT: actually i can't get to the page at all by clicking on the link though typing it into the browser did work. isn't that weird!]

is there a way to set a softlink so we don't need the trailing slash at all?

Last edited by pradtf (2023-06-14 05:59:47)


in friendship,
prad

Offline

#2 2023-06-14 00:19:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: SOLVED accessing a webpage via softlink

pradtf wrote:

... she had to put in the trailing slash or she couldn't access it

Would that be any different if she tried to access http://towardsfreedom.com/ictvity/ethology/fireworks (without the trailing slash)?

pradtf wrote:

is there a way to set a softlink so we don't need the trailing slash at all?

Link to the actual index.html rather than the directory.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-06-14 01:14:22

pradtf
Member
Registered: 2009-06-10
Posts: 149

Re: SOLVED accessing a webpage via softlink

i don't know what would happen if she tried
http://towardsfreedom.com/ictvity/ethology/fireworks
i do know it works fine for me (and probably on a windows machine too).

i tried that
tt -> ictvity/ethology/fireworks/index.html
but for me on both vivaldi and netsurf browsers
www.towardsfreedom.com/tt
it is just downloading the index.html file for some reason instead of displaying it.

even though the following
www.towardsfreedom.com/ictvity/ethology/fireworks/index.html
displays it properly.

but if i do
tt.html -> ictvity/ethology/fireworks/index.html
and go to
http://towardsfreedom.com/tt.html

i get the page, but the pic doesn't show as though i've accessed the wrong directory.


in friendship,
prad

Offline

#4 2023-06-14 02:42:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: SOLVED accessing a webpage via softlink

pradtf wrote:

it is just downloading the index.html file for some reason instead of displaying it.

That would be up to your web server settings.  I gather this is a fairly "vanilla" apache server then right?

pradtf wrote:

i get the page, but the pic doesn't show as though i've accessed the wrong directory.

Yes, if you have relative urls within index.html this would be a problem unless you also define a <base> (which you should if you're using relative urls).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2023-06-14 02:54:38

pradtf
Member
Registered: 2009-06-10
Posts: 149

Re: SOLVED accessing a webpage via softlink

ya it's lighttpd and pretty straightforward.

however, i have another theory now because she just tried
www.towardsfreedom.com/tt
and got through no problem on her mobile - safari on her desktop was fine too and putting in the trailing slash on its own.

what i think may have happened was when she originally tried
www.towardsfreedom.com/ff
something went wrong - may be my server was down or i was doing maintainence.
that wrong result got stored in the cache of her mobile browser, so it kept coming up each time.

but with
www.towardsfreedom.com/tt
it's a new link so the cache doesn't come into it and it goes right away.

does the above sound plausible?

thx for the tip on the webserver settings - i'm not sure why i was getting the downloads - it's working just fine now, but i should investigate.

also, thx for the explanation regarding the base - i'll look into that too!
(it's been a while since i've done my own webhosting so i think i overlooked some stuff or just didn't know about it.)

Last edited by pradtf (2023-06-14 02:58:25)


in friendship,
prad

Offline

#6 2023-06-14 03:27:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: SOLVED accessing a webpage via softlink

pradtf wrote:

does the above sound plausible?

That depends.  You never really defined what it meant that the other person "couldn't access" the page.  But if your server gave a 200 response with an incorrect body / content, then certainly it could / would be cached.  But this couldn't happen due to the server being down for maintenance: it would have to be up, and actively responding to requests, just doing so incorrectly.

I haven't used lighttpd, but a quick google search shows that it can be configured for rewriting urls which may be better than making symlinks.

Last edited by Trilby (2023-06-14 03:30:49)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2023-06-14 05:58:55

pradtf
Member
Registered: 2009-06-10
Posts: 149

Re: SOLVED accessing a webpage via softlink

hey trilby!!
i read up on your rewrite url idea, but didn't really understand it yet.
BUT!!
i found the redirect idea instead and did this in the lighttpd.conf file

erver.modules = (
               #"mod_accesslog"
               "mod_redirect"
               )
url.redirect = (
	 "^/ff" => "http://towardsfreedom.com/ictvity/ethology/fireworks/",
	 "^/fireworks" => "http://towardsfreedom.com/ictvity/ethology/fireworks/",
	 "^/fireworksfrustration" => "http://towardsfreedom.com/ictvity/ethology/fireworks/"
)

everything seems to work grandly and i've removed the symlinks!
i thought symlinks were a bit dicey but they worked for the most part, so i used them.
however, doing it through the server conf does seem more solid to me too!

(my friend will tell me what she did tomorrow, but it'll be too late because i've already changed the setup to redirects.)

thx a lot for your help!!

Last edited by pradtf (2023-06-14 05:59:22)


in friendship,
prad

Offline

Board footer

Powered by FluxBB