DotDragnet
February 08, 2012, 07:30:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Help decide how we fund DDN and where we take the community from here. Post in the thread all about it: http://www.dotdragnet.com/forum/index.php/topic,4368.0.html
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Block subdomain, allow main domain  (Read 426 times)
Ben
Hero Member
*****
Posts: 766


I didn't do it


View Profile Awards
« on: August 01, 2010, 12:09:39 PM »

My wee brain is refusing to help me this morning  big grin

I'm beginning to host my sites on a specific domain (example.com), so the site website1.com actually lives at example.com/~website1/ or website1.example.com


What I'd like to do is block traffic that is visiting either of the example.com addresses, other than the properly domain website1.com - I'm thinking .htaccess?

Any ideas?
Logged
Bradman
Newbie
*
Posts: 21



View Profile Awards
« Reply #1 on: August 01, 2010, 02:24:55 PM »

301 redirect via .htaccess should do it?
Logged
Ben
Hero Member
*****
Posts: 766


I didn't do it


View Profile Awards
« Reply #2 on: August 01, 2010, 04:01:05 PM »

Was hoping to do it overall, rather than site-by-site, but looks like that wouldn't work. Off to write some .htaccess files, me thinks!
Logged
JasonD
Global Moderator
Hero Member
*****
Posts: 529



View Profile Awards
« Reply #3 on: August 01, 2010, 06:07:23 PM »

Disable mod_userdir or whatever allows that form of url in the first place.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!