Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009

    .htaccess redirect if TLC domain not IP

    Is it possible to redirect a site to a page if the domain name is loaded ie. But if the IP only is loaded it loads the normal index page.

    So like this:
    if is loaded, redirect to comingsoon.php

    but if IP is loaded, just load the site normally.

    I'm trying to find an easy way to develop new sites without being live and without having to have the domain resolve to one server and the actual development server be on another server. so when it's time to go live I can just remove that .htacess code and the site will load normal.

    Let me know if and how this is possible. Maybe there is an easier way to do this.

  2. #2
    Join Date
    Mar 2011
    you can password protect it using .htaccess too. That's how we normally do this and it works very well. If you leave your ip address open during development, someone else might come across it and mess with your site.

  3. #3
    Join Date
    Apr 2009
    ok, nice! but how do you tell visitors that the site is under development? I mean, say for a new wordpress site, how do you password protect the frontend overall site and have a message. Is there a plugin for that?

  4. #4
    Join Date
    Jul 2009
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^$
    RewriteRule (.*) [R=301,L]
    Sam Barrow - CEO @ SQUIDIX (1-855-SQUIDIX)
    Ask Us About Sponsoring Your Web Site (High Traffic Sites Only)
    Squidix - Shared, Reseller, Semi-Dedicated, Managed VPS and Managed Dedicated Hosting
    Midwestern Web - Web Design & Development Services

Similar Threads

  1. Replies: 7
    Last Post: 10-26-2010, 10:18 PM
  2. htaccess redirect of all but one IP address to page on SAME Domain
    By webdesigndude in forum Hosting Security and Technology
    Replies: 1
    Last Post: 06-09-2010, 06:47 PM
  3. .htaccess redirect hotlink to new domain
    By ThatScriptGuy in forum Programming Discussion
    Replies: 2
    Last Post: 02-15-2007, 08:26 AM
  4. Replies: 3
    Last Post: 10-09-2006, 02:48 PM
  5. .htaccess? redirect domain to subfolder
    By Canadaka in forum Hosting Security and Technology
    Replies: 8
    Last Post: 10-24-2004, 12:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts