• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

Help with simple html please - i need an expert

Status
Not open for further replies.
Joined
Aug 12, 2005
Posts
125
Reaction score
3
I want to display the current url of the page on the webpage, is there a command to do this in html?

i did find a javascript to do it, it worked in ie, but not firefox?

help anyone please?
 
best way would be with PHP.

<?$hostname = $_SERVER['HTTP_HOST'];?>
<?echo $hostname?>

Just put that in your page and rename it mypage.php

Or if you still want it to be mypage.html then put this in your .htaccess file

AddType application/x-httpd-php .php .html
Options +FollowSymlinks

That will make html files parse as php files.
 
Last edited:
In ASP this would be :
Response.write( "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") ) & "?" & Request.ServerVariables("QUERY_STRING") ) %>
 
thanks.

what if I am url forwarding the domain using frames, (the browser still shows the originally typed domain name, but in fact you are on a different page)

.. is it possible to display the url i originally keyed ?
 
I know a tricky way to do it in HTML: you need to create a frame of 1 pixel high at the top of your page and display your content in a second frame, which would take the rest of the screen. I hope it helps !
 
Status
Not open for further replies.
Top Bottom