subdomain question

darkus

Verified User
Joined
Dec 15, 2005
Messages
128
I have my site located at www.example.com

I created a subdomain named blog.example.com

which loads information from the blog folder.


What I want to achieve is to have blog.example.com actually point to a file named blog.php located in my main public_html directory. (i cant move the php file to the blog directory, i want it more to be a pointer to that file)

Anyone have any idea how to achieve this effect?

thanks!
 
Try this:

Create your subdomain as a domain (not a subdomain but as a regular domain).

Then click on Site Redirection and create a redirect.

Or create a redirect as using an .htaccess file in the newly created domain.

Jeff
 
After setting up redirect for a subdomain, how can I hide/mask the target location so that the subdomain title (subdomain.mydomain.com) stays in the address bar? :)
 
Create a zero-height frameset with a redirect.

Here's an example of one I wrote (it's a simple index.html file) for one of our domain registration systems:
Code:
<HTML>
<FRAMESET ROWS="*,0" FRAMEBORDER=0 BORDER=0 FRAMESPACING=0>
<FRAME SRC="https://secure.registerapi.com/order/register/check.php?siteid=9971
</FRAMESET>
</HTML>
To see it in action:

http://domains.nobaloney.net/

Note it redirects, switches to https, and only then uses the zero-height frameset.

(Don't buy domains there unless you want to overpay; that's not our cheap solution ;) .)

Jeff
 
hm....I don't think that's what I'm looking for....(I think)....the subdomain name doesn't stay in the address bar after it redirects which is what I'm trying to do.

When a user goes to http://stats.vivamexclan.com I want "stats.vivamexclan.com" to stay in the address bar instead of the real url (http://vivamexclan.com/vsp/pub/themes/bismarck/index.php)....I've been trying to find info on this but I can't understand the jargon...and I'm a friggen computer tech too! :o

I think I read about a method to "hide/replace/mask" that long url with the subdomain name by modifying the .htaccess file with write/rewrite command or something like that, but that won't do me much good because if a user clicks any other links within that page, the long url will just come back up right?

So somebody here at work (that knows a thing or two about building sites) mentioned that I could possibly create another domain (but name it stats.vivamexclan.com) then specify the folder where I have the index.php file (in this case it would be the bismarck folder) as my root folder....that way it will find the index.php file there and the subdomain name will stay in the address bar.

Is this even possible? LOL
Thanks for you help.
 
Last edited:
Actually it is... I accidentlaly threw you offtrack by giving you the first URL, which redirects to the one that uses the zero-height framesite.

Instead of http://domains.nobaloney.net/ look at:

https://secure.ezsecureusa.com/nobaloney/domains/

We rewrite as that to go from our recognized domain to the domain on which we run a shared secure site.

(We don't need the shared secure site, because the site inside the frame is a secure site, but doing it this way avoids browser cert errors.)

Look around our site; notice the URL never changes.

Is this what you want?

Jeff
 
oh ya...that's it! :p
But i want the folder where the index.php file is located to be the actual root folder so that way I won't end up with a domain of stats.vivamexclan.com/vsp/pub/themes/bismarck/index.php....all I want to be visible is stats.vivamexclan.com.

Can I do that? :cool:
 
Absolutely. We didn't because we're using a shared Certificate and we use folders under the shared Certificate subdomain.

Jeff
 
so should I copy the code you gave me into the .htaccess file or upload it as an index.html file or??? :o
 
Back
Top