linuxraja
asked on
Apache Redirection
What is the best redirection to add for Google rating during the maintanance time.Currently we are adding the following lines during maintanance.
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^192\.168\.
RewriteRule /splash/index.html / [R=301,L]
Google is threatening to remove some sites from their ranking completely due to this.
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^192\.168\.
RewriteRule /splash/index.html / [R=301,L]
Google is threatening to remove some sites from their ranking completely due to this.
ASKER
After adding this its Providing syntax error while restarting apache
RewriteRule: invalid HTTP response code for flag 'R'
RewriteRule: invalid HTTP response code for flag 'R'
> RewriteRule: invalid HTTP response code for flag 'R'
> "If you're on apache 2.2"
So you're not on apache 2.2 but on an older branch, hence you can't issue a 503 with mod_rewrite.
What you can do is to rewrite (internally) to some script, e.g. php or perl or whatever and use the header/status functions to set a http status code provided by the language of you choice.
> "If you're on apache 2.2"
So you're not on apache 2.2 but on an older branch, hence you can't issue a 503 with mod_rewrite.
What you can do is to rewrite (internally) to some script, e.g. php or perl or whatever and use the header/status functions to set a http status code provided by the language of you choice.
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^192\.168\.
RewriteRule /splash/index\.html /internal-script.php [L]
ASKER
This seems good. Can you give me the content of internal-script.php script
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you're on apache 2.2, you could use
Open in new window