corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » redirect all web traffic to a single domain?


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author redirect all web traffic to a single domain?
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
23rd Jan 14 at 16:36   View User's Profile U2U Member Reply With Quote

I would like to redirect all website traffic to a single domain www.mydomain.com for a simple reason that im making a PC available to a large number of users solely to be used for visiting www.mydomain.com

I want to keep the PC as simple as possible, don't want user accounts on their, so don't want to join it to AD.

Can I do something as simple as edit the hosts file for something like * www.mydomain.com ?
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
23rd Jan 14 at 17:16   View Garage View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Bart
I would like to redirect all website traffic to a single domain www.mydomain.com for a simple reason that im making a PC available to a large number of users solely to be used for visiting www.mydomain.com

I want to keep the PC as simple as possible, don't want user accounts on their, so don't want to join it to AD.

Can I do something as simple as edit the hosts file for something like * www.mydomain.com ?


What FW? IIRC you can do it via a .pac file
Dom
Member

Registered: 13th Sep 03
User status: Offline
23rd Jan 14 at 17:19   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Bart
Can I do something as simple as edit the hosts file for something like * www.mydomain.com ?


You can manipulate the routing table using the route command under windows but you're dealing with IP addresses only (website would need to be reachable via an IP address).

Otherwise you'd need to use a DNS and apply routing rules to that.
Dom
Member

Registered: 13th Sep 03
User status: Offline
23rd Jan 14 at 17:34   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by VrsTurbo
IIRC you can do it via a .pac file


You sure?
I thought PAC files just allow you to script conditions for redirecting traffic to a proxy (or not/'direct'). Can't say i've ever come across the ability to redirect to a specific hostname within a PAC; if you can though, then it'll save a lot of arseache.

[Edited on 24-02-2014 by Dom]
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
23rd Jan 14 at 17:40   View Garage View User's Profile U2U Member Reply With Quote

Don't understand why you can't do this in your DNS snap in?
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
23rd Jan 14 at 18:18   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by pow
Don't understand why you can't do this in your DNS snap in?


Please elaborate how?
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
23rd Jan 14 at 18:28   View Garage View User's Profile U2U Member Reply With Quote

It's internal yes?

Scrap that I understand what you're doing now. A PAC file would work, redirect www.mydomain.com to www.mydomain.com and everything else to the loop back address or something. Host the PAC file locally and point IE to it. Might be worth manually configuring the DNS addresses to loop back as well?

The other thing you can do to help this is start internet explorer in kiosk mode.

[Edited on 23-01-2014 by pow]
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
23rd Jan 14 at 20:42   View User's Profile U2U Member Reply With Quote

never even heard or used PAC files before.
That sounds too complicated already
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
23rd Jan 14 at 21:25   View User's Profile U2U Member Reply With Quote

actually, it can be done with Nod32:
http://kb.eset.com/esetkb/index?page=content&id=SOLN2844

not the most cleverist, and someone IT related might be able to bypass them.

I can password protect the Nod32 settings, so that'll be good enough I think
Dom
Member

Registered: 13th Sep 03
User status: Offline
23rd Jan 14 at 21:29   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by pow
A PAC file would work, redirect www.mydomain.com to www.mydomain.com and everything else to the loop back address or something.


Any more info on redirects within PAC files?
Past experience is that you can't (it's designed for dealing with proxy redirections not hostnames) and Google seems to suggest the same.


Still think a local/external DNS server is your only option if you're wanting to redirect all to a hostname/domain. Or change routing table if the site is accessible via IP.


Edit - If you're wanting to display your website on a PC for guests then i'd be looking into running the system (and browser) in kiosk mode; plenty of tutorials if you Google.

Edit 2 - Quick Google - http://sysadministrivia.blogspot.co.uk/2012/05/creating-kiosk-machine-with-windows-7.html

[Edited on 23-01-2014 by Dom]
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
23rd Jan 14 at 22:19   View User's Profile U2U Member Reply With Quote

Looked into kiosk mode, in Win8 it's all tied in with user accounts (Microsoft not local accounts), so it's a bit messy, as I want a stand alone machine without any account info.

I'm pretty happy with what I have now, but a type of kiosk mode does look intriguing.

[Edited on 23-01-2014 by Bart]
Dom
Member

Registered: 13th Sep 03
User status: Offline
23rd Jan 14 at 22:33   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Bart
Looked into kiosk mode, in Win8 it's all tied in with user accounts (Microsoft not local accounts), so it's a bit messy, as I want a stand alone machine without any account info.


You mean assigned access?
You can use Win8 with local accounts (i do), same as other Win OS's, and assigned access can be applied to local accounts - so you shouldn't have any issues setting it up
Neo
Member

Registered: 20th Feb 07
Location: Essex
User status: Offline
23rd Jan 14 at 22:57   View User's Profile U2U Member Reply With Quote

Skimmed this but sounds like it will do what you want

http://smallbusiness.chron.com/block-websites-except-one-56338.html
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
23rd Jan 14 at 22:59   View Garage View User's Profile U2U Member Reply With Quote

I do it at work with our intranet and the PAC file... I'll dig it out tomorrow. It's a dirty hack though really!
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
24th Jan 14 at 11:54   View Garage View User's Profile U2U Member Reply With Quote

This should work:

function FindProxyForURL(url, host)
{
// don't proxy example.com:
if (shExpMatch(host, "example.com"))
{
return "DIRECT";
}
// All other requests go through fake proxy server
return "PROXY proxy.example.com:8080;
}

Assuming there is no proxy in place - it'll redirect any other traffic to a proxy that doesn't exist so users will get a proxy server not responding page. Set the proxy in IE and lock it all down.

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
.htaccess folk - need help Dom Geek Day 7 613
21st Jun 06 at 23:37
by Dom
 
I have a small problem Steve Geek Day 38 1133
20th Feb 07 at 13:24
by Steve
 
Web Hosts AdZ9 Geek Day 5 1380
7th May 08 at 22:25
by WATSON
 
Domain re-direct... Whittie Geek Day 11 649
23rd Jul 12 at 20:04
by Whittie
 
"Soft" redirect of URL Balling Geek Day 11 513
18th Oct 12 at 13:26
by Dom
 

Corsa Sport » Message Board » Off Day » Geek Day » redirect all web traffic to a single domain? 28 database queries in 0.0155370 seconds