Temporary Maintenance using Mod_Rewrite

Started by -=[Vyorel]=-, Nov 03, 2012, 03:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

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.

# 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.