Author Topic: Temporary Maintenance using Mod_Rewrite  (Read 135 times)

0 Members and 1 Guest are viewing this topic.

Offline -=[Vyorel]=-

  • Owner
  • Administrator
  • High-Roller
  • *
  • Posts: 4657
  • Respect: +176/-28
  • Gender: Male
  • Last Login:Yesterday at 12:06:56 AM
  • www.RO-PH.com
    • RO Power Hosting
  • Oras: Braila
Temporary Maintenance using Mod_Rewrite
« on: November 03, 2012, 03:07:15 PM »
Folosind acest cod, puteti lucra la site-ul d-voastra in liniste. Ceilalti vizitatori v-or fi redirectionati catre o alta adresa/alt fisier. In acel fisier puteti face o pagina cu textul Under Construction sau cum vreti voi.

Code: [Select]
# Don't forget to turn on the rewrite engine
RewriteEngine on

# Maintenance Redirection
# Replace 555\.555\.555\.555 with your own IP address
# Powered by xerom-zone.com
# Uncomment first conditional to turn off the redirection
# RewriteCond %{REQUEST_URI} ^$a
RewriteCond %{REQUEST_URI} !maintenance.html
RewriteCond %{REQUEST_FILENAME} !(styles|images).+$
RewriteCond %{REMOTE_ADDR} !^555\.555\.555\.555$
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
RewriteRule (.*) /maintenance.html [R,L]

Ca sa nu va redirectionati si voi pe cealalta pagina si sa vedeti site-ul intreg, inlocuiti 555\.555\.555\.555 din cod cu IP-ul d-voastra.

Offline The Matrix

  • RMDCorp
  • ROPH Friends
  • High-Roller
  • *****
  • Posts: 2764
  • Respect: +11/-47
  • Gender: Male
  • Last Login:October 27, 2014, 09:53:23 PM
  • IT
  • Oras: Bucuresti
Re: Temporary Maintenance using Mod_Rewrite
« Reply #1 on: November 06, 2012, 10:59:01 PM »
Super  B-)