I want to redirect access to a different page when someone is using my server's IP address to access my site.

Posted on 2006-06-01
Last Modified: 2010-03-04
how can I make it so that some other page, instead of index.html, is pulled up when someone enters my server's IP address, instead of my site's address?


Question by:kailee
    1 Comment
    LVL 51

    Accepted Solution

    RewriteEngine On
    RewriteCond %{HTTP_HOST} [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
    RewiteRule (.*) /your-ip.html

    this works for HTTP/1.1 request only, if you expect HTTP1.0 requests too, then you have to setup a virtual host for that IP

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
    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…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now