Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Url forwarding

Url forwarding
Thread Tools
macintologist
Professional Poster
Join Date: Apr 2002
Location: Smallish town in Ohio
Status: Offline
Reply With Quote
Oct 29, 2006, 03:01 AM
 
There's something I don't understand about URL forward and domain registration.

I have a web server hosted on my computer.

I want to register a domain, lets say www.macintologist.com

I want it to forward to my host machine but I want the url to stay www.macintologist.com and even to show things like www.macintologist.com/mp3s/blues/

You know what I mean? Is this possible to do with a simple domain registration?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Oct 29, 2006, 03:07 AM
 
Originally Posted by macintologist View Post
There's something I don't understand about URL forward and domain registration.

I have a web server hosted on my computer.

I want to register a domain, lets say ONESTOP NETWORK - $11 Domains - Free & Low Cost Hosting For All!

I want it to forward to my host machine but I want the url to stay ONESTOP NETWORK - $11 Domains - Free & Low Cost Hosting For All! and even to show things like www.macintologist.com/mp3s/blues/

You know what I mean? Is this possible to do with a simple domain registration?

The domain registration simply indicates which DNS server is authoritative over this domain. You still need a DNS server setup which will resolve requests to your domain, which sounds like the missing piece in your puzzle.

Fortunately, you can enable Bind under OS X and open up the DNS server ports so that your Mac doubles as a DNS server. Alternatively, you can point your domain to another DNS server which will then direct requests to your machine's IP. If you want to think of a DNS server "forwarding" requests to your machine, I suppose you could, but it would probably be more accurate to say that the DNS server would *direct* traffic to your machine.

Does this make sense?
     
macintologist  (op)
Professional Poster
Join Date: Apr 2002
Location: Smallish town in Ohio
Status: Offline
Reply With Quote
Oct 29, 2006, 06:48 PM
 
Originally Posted by besson3c View Post
The domain registration simply indicates which DNS server is authoritative over this domain. You still need a DNS server setup which will resolve requests to your domain, which sounds like the missing piece in your puzzle.

Fortunately, you can enable Bind under OS X and open up the DNS server ports so that your Mac doubles as a DNS server. Alternatively, you can point your domain to another DNS server which will then direct requests to your machine's IP. If you want to think of a DNS server "forwarding" requests to your machine, I suppose you could, but it would probably be more accurate to say that the DNS server would *direct* traffic to your machine.

Does this make sense?
Yes it does make sense but theres one extra piece to this puzzle. I'm behind a university firewall and I only intend students on the network to be able to visit my site. So if I set up a DNS server on my IP address, when someone on campus types in
Code:
www.macintologist.com
it should then tell them to resolve to my ip address despite the fact that the international domain controllers CANNOT see my IP address because im behind a big firewall.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Oct 29, 2006, 11:01 PM
 
Originally Posted by macintologist View Post
Yes it does make sense but theres one extra piece to this puzzle. I'm behind a university firewall and I only intend students on the network to be able to visit my site. So if I set up a DNS server on my IP address, when someone on campus types in
Code:
www.macintologist.com
it should then tell them to resolve to my ip address despite the fact that the international domain controllers CANNOT see my IP address because im behind a big firewall.

Oh, well then I think you are going to need a DNS lookup done by a machine that can see both your inside and the outside world.
     
kick52
Baninated
Join Date: May 2005
Location: England
Status: Offline
Reply With Quote
Oct 29, 2006, 11:06 PM
 
see here:

http://forums.macnn.com/88/web-devel...eb-forwarding/

i had my own webspace (kick52.com) and i set up a sub-domain. in that sub-domain i put an .htaccess with a 301 redirect (redirects the path you chose. so going to subdomain.domain.com/files/file goes to ip.ip.ip.ip.ip/files/file) i had a dynamic ip, so i got around this with a cron script that ran every 5 mins to write an .htaccess file with a 301 redirect with my IP slipped in.

hope this helps.
when it is up:
Index of /
     
macintologist  (op)
Professional Poster
Join Date: Apr 2002
Location: Smallish town in Ohio
Status: Offline
Reply With Quote
Oct 30, 2006, 02:18 AM
 
Originally Posted by kick52 View Post
see here:

http://forums.macnn.com/88/web-devel...eb-forwarding/

i had my own webspace (kick52.com) and i set up a sub-domain. in that sub-domain i put an .htaccess with a 301 redirect (redirects the path you chose. so going to subdomain.domain.com/files/file goes to ip.ip.ip.ip.ip/files/file) i had a dynamic ip, so i got around this with a cron script that ran every 5 mins to write an .htaccess file with a 301 redirect with my IP slipped in.

hope this helps.
when it is up:
Index of /
Sawtooth.kick52.com is redirecting to your home computer which is good, which is what I'm looking for, except I don't want the URL to change, I want it to remain the same, and when you're navigating through folders like kick52.com/files I want it to look like that too. I don't want it resolving to an IP address in the URL bar.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Oct 30, 2006, 02:43 PM
 
Originally Posted by macintologist View Post
Sawtooth.kick52.com is redirecting to your home computer which is good, which is what I'm looking for, except I don't want the URL to change, I want it to remain the same, and when you're navigating through folders like kick52.com/files I want it to look like that too. I don't want it resolving to an IP address in the URL bar.

Sounds like this will involve mod_rewrite. Google it and see if this sounds like what you are looking for.
     
macintologist  (op)
Professional Poster
Join Date: Apr 2002
Location: Smallish town in Ohio
Status: Offline
Reply With Quote
Nov 1, 2006, 05:58 PM
 
Originally Posted by besson3c View Post
Sounds like this will involve mod_rewrite. Google it and see if this sounds like what you are looking for.
That sounds like it will work. It looks pretty complex, editing those config files and all. If I run into any trouble I'll ask some of my comp sci major friends.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Nov 1, 2006, 06:01 PM
 
Originally Posted by macintologist View Post
That sounds like it will work. It looks pretty complex, editing those config files and all. If I run into any trouble I'll ask some of my comp sci major friends.

You don't have to, you can drop your rules into an .htaccess file. Here is a cheat sheet:

the jackol’s den � htaccess Cheatsheet - Mikhail Esteves

Just combine a rewritecond with a rewrite rule, it should do it.
     
kick52
Baninated
Join Date: May 2005
Location: England
Status: Offline
Reply With Quote
Nov 1, 2006, 06:19 PM
 
Originally Posted by macintologist View Post
Sawtooth.kick52.com is redirecting to your home computer which is good, which is what I'm looking for, except I don't want the URL to change, I want it to remain the same, and when you're navigating through folders like kick52.com/files I want it to look like that too. I don't want it resolving to an IP address in the URL bar.
you can set up the rediecting page to have a frame. easy.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:56 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,