"Catch all" Domain

Discussion in 'Web Design' started by KrasS, Aug 18, 2013.

  1. KrasS

    KrasS BANNED BANNED

    Joined:
    Jan 6, 2009
    Messages:
    109
    Likes Received:
    475
     
  2. TheeAriGrande

    TheeAriGrande Regular Member

    Joined:
    Jul 14, 2013
    Messages:
    270
    Likes Received:
    153
    Location:
    Candlestick Park
    You would use the .htaccess file.

    Use this code in your .htaccess file
    Code:
    RewriteEngine on 
    RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule . index.php [L]
    
    This will redirect any requests of files that DO NOT exist to your index.php. For example, say the an image is getting requested. The image will be the response because the file actually exists. If it didn't exist then the response would come from the index.

    Hope this helps. Let me know if you need a little more help.
     
    • Thanks Thanks x 2
    Last edited: Aug 18, 2013
  3. KrasS

    KrasS BANNED BANNED

    Joined:
    Jan 6, 2009
    Messages:
    109
    Likes Received:
    475
    Thanks you, worked fine :D