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: HTTP_HOST without subdomain?

Status
Not open for further replies.

spietreser

Level 7
Legacy Platinum Member
Joined
May 30, 2002
Messages
845
Reaction score
2
Hi,

I'm developing a standard for-sale parking page for my domains, but I want it to recognize the domain and dynamically output the domain name.

I have a file named something.shtml. Here I want to display the message: "Welcome to Mydomain.com"
But when I try to get the domain with HTTP_HOST it displays the subdomain (eg. "Welcome to Www.mydomain.com")

Question 1: how do I get rid of the subdomain, so the page will only display the domain without subdomains? Can this be done within the .shtml page?

Question 2:
I have a form on the page with a form that points to an email sending script in PHP. If someone enters an incorrect email address, it will display an error page (same script, .php extension). How do I get this PHP script to also output the domain without subdomain dynamically?

Many thanks in advance!

spietreser
 
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 1) View details

The Rule #1

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

Members Online

Premium Members

Upcoming events

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom