• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

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

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?

Thanks,

0
kailee
Asked:
kailee
1 Solution
 
ahoffmannCommented:
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
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now