SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Thread: htaccess conditional for localhost and server

  1. #1
    Community Advisor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,182
    Mentioned
    35 Post(s)
    Tagged
    2 Thread(s)

    htaccess conditional for localhost and server

    Is it possible with a .htaccess file to detect if the server is http://localhost and if so to implement a conditional block?

    .htaccess
    PHP Code:

    # if ( server == http://localhost)
    #    RewriteEngine on
    #    RewriteBase /xamp/loca;
    #    DirectoryIndex index.php index.html index.htm research_002.html
    # else 
    #   RewriteEngine on 
    #   RewriteEngine on
    #   RewriteBase /
    #   DirectoryIndex index.php index.html
    # endif 
    Last edited by Force Flow; Apr 14, 2012 at 19:12.

Bookmarks

Posting Permissions

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