Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Rewrite Rule Link Issue

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #151453

    While I am on my maintenance mode I still would like to view my sub folder that I have for testing.

    currently it goes straight to maintenace page

    test area <!-- would like to view test folder link but when type in still redirects to maintenance page
    http://www.example.com/test/index.php
    
    
    maintenance area
    http://www.example.com/maintenance/index.html
    
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !/maintenance/index.html$ 
    RewriteCond %{REMOTE_HOST} !^***\.***\.**\.***
    RewriteCond %{REQUEST_FILENAME} !-f
    
    RewriteRule $ /maintenance/index.html [R=302,L]
    
    #151462
    Paulie_D
    Moderator

    And again you posted in the wrong section of the forum.

    Moved.

    #151470

    I thought would let you know I just did a bit of Googling around and found this got it to work Just add that below RewriteEngine on

    RewriteCond %{REQUEST_URI} ^/test3
    RewriteRule .+ - [L]
    
    #151494
    __
    Participant

    If

    RewriteCond %{REMOTE_HOST} !^***\.***\.**\.***
    

    then why does it matter which page you’re requesting? Wouldn’t you like to be able to see the entire site while you’re in testing mode?

    , – – – – – – – – – – – – – – – – – – – – – – – – –

    BTW your “solution”

    RewriteCond %{REQUEST_URI} ^/test3
    RewriteRule .+ - [L]
    

    will allow anyone to view the /test3 folder while your site is in “maintenance mode,” not just you.

    , – – – – – – – – – – – – – – – – – – – – – – – – –

    Also, this

    RewriteCond %{REQUEST_FILENAME} !-f
    

    makes this

    RewriteCond %{REQUEST_URI} !/maintenance/index.html$ 
    

    redundant (since index.html is, presumably, a file).

    #151568

    With this RewriteCond %{REMOTE_HOST} !^..**.*** I have just put asterisks there so know one can see my ip I have my own custom ip

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Other’ is closed to new topics and replies.