LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-12-2011, 08:09 PM   #1
konddor
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
.htaccess blocked access Host-headers


Hi,

We want apache to server and load our website Only for One specific
sub-domain and all other domains should be ignored/dropped or redirect.

Any suggestions?

Thanks!
 
Old 03-13-2011, 05:08 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,219
Blog Entries: 1

Rep: Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073
Hi,

You can use mod_rewrite. Something like that will do:
Code:
RewriteEngine on

RewriteCond %{HTTP_HOST} !^specific.sub-domain.com$
RewriteRule (.*) - [F]
Regards
 
1 members found this post helpful.
Old 03-13-2011, 01:44 PM   #3
konddor
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Working great, Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
removal of host name in mail headers? mjh Linux - Server 3 01-12-2008 07:29 AM
"CLIENT HOST BLOCKED USING relays.ordb.org Niceman2005 Linux - General 8 05-18-2006 01:59 AM
blocked access kolter Linux - Security 2 01-11-2003 08:02 AM
Smoothwall and Host Headers fortuneplus Linux - Security 2 12-12-2001 11:56 AM
htaccess via host Ratclaws Linux - Security 1 12-01-2001 05:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration