Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

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.

Rule #1: Be Respectful

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

Premium Members

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Siusaidh AcornBot:
    Siusaidh has left the room.
      Siusaidh AcornBot: Siusaidh has left the room.
      Top Bottom