Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

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 !
 
DomainTags.co.uk said:
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 ?

make the frame redirect to www.newdomain.com/?domainname=original.co.uk

then <? echo "$domainname"; ?> in PHP.

Cheers,
Rob.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom