Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Processing Site-Only Requests

Posted on 2009-05-18
2
Medium Priority
?
268 Views
Last Modified: 2012-05-07
Hey experts,

  I have one site (mysite.com) hosted on my server using apache; I need to change a configuration flag in apache to allow my server to only process requests to mysite.com and to deny all other requests; for example, if there is a site example.com pointing to my server ip, I want my server to deny requests to this site; any help on what this flag in apache is?
0
Comment
Question by:mte01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 1200 total points
ID: 24415699
The simplest approach is to use NameBased VirtualHosts
The default virtual host (catch all) should deny anyone.

Another approach is to use mod_rewrite, eg.

RewriteCond %{HTTP_HOST} !^(www.)?mysite.com
RewriteRule .* - [L,F]
0
 
LVL 3

Author Comment

by:mte01
ID: 24415834
>>ravenpl

Many thanks for your assisting comment! (It looks great!) I'll try it, and I'll inform you of the results
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question