Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [afinlr] Current URL

Quote Reply
Re: [afinlr] Current URL In reply to
Hi afinlr

Cannot guarantee this but SSI might do what you require. I used to use it to call images into a page based on the url, so I had the same page but depending on what URL you used to get to it would display the appropriate image.

It may be possible to take it one step further and echo the URL BUT when I started developing my links I used ssh but told it was really that advisable in links (due in part possibly to the way it calls globals etc) although I never had any problems.

Might be worth investigating though.

Loosely recalling what i did, as it was a while ago, I had images that were the name of the url, so the image was called www.mypicture.co.uk.jpg
Obviously everything is extension *.shtml
The line to call the image inside te webpage was
<!--#include virtual="$HTTP_HOST.jpg" -->

This then pulled in the url name and added the jpg to display the image

I am not too technical but it's a neat trick and it may be able to go one step further and simply echo the url but I am afraid I can't help you any further.

Actually, just had a thought. You could have a text file with your url name in it. save as www.mytextfile.co.uk.txt then pump in the include virtual but with txt instead of jpg, that would probably do it.Wink

I found shtml and ssi to be a bit tricky sometimes so a good tool I also used was something called ssi.cgi. If you go down this path you will see how useful it is as it gives yoiu the paths you need. SSi only operates in sub folders from the root of the same parent.

This may or may not help but you never know.

good luck!


Cheers
KevM
Subject Author Views Date
Thread Current URL afinlr 6433 Apr 5, 2004, 5:19 PM
Thread Re: [afinlr] Current URL
Andy 6369 Apr 6, 2004, 12:15 AM
Thread Re: [Andy] Current URL
afinlr 6282 Apr 6, 2004, 4:14 AM
Thread Re: [afinlr] Current URL
KevM 6286 Apr 6, 2004, 6:59 AM
Thread Re: [KevM] Current URL
afinlr 6262 Apr 6, 2004, 7:48 AM
Thread Re: [afinlr] Current URL
KevM 6272 Apr 6, 2004, 8:21 AM
Post Re: [KevM] Current URL
afinlr 6259 Apr 6, 2004, 8:24 AM
Thread Re: [KevM] Current URL
afinlr 6272 Apr 6, 2004, 8:28 AM
Thread Re: [afinlr] Current URL
KevM 6247 Apr 6, 2004, 8:35 AM
Post Re: [KevM] Current URL
afinlr 6261 Apr 6, 2004, 8:58 AM
Thread Re: [afinlr] Current URL
pugdog 6235 Apr 6, 2004, 10:32 AM
Thread Re: [pugdog] Current URL
afinlr 6249 Apr 6, 2004, 12:09 PM
Thread Re: [afinlr] Current URL
pugdog 6212 Apr 6, 2004, 3:35 PM
Thread Re: [pugdog] Current URL
afinlr 6220 Apr 6, 2004, 3:39 PM
Thread Re: [afinlr] Current URL
pugdog 6202 Apr 7, 2004, 3:19 PM
Thread Re: [pugdog] Current URL
afinlr 6203 Apr 7, 2004, 3:35 PM
Thread Re: [afinlr] Current URL
mick31 6087 Dec 23, 2004, 6:22 AM
Post Re: [mick31] Current URL
afinlr 6069 Dec 24, 2004, 9:10 AM