I want to show 503 error on a specific URL of my website. This should only apply to that specific URL and other pages should load fine. So far I’ve tried the following with no luck. Any help is appreciated. Thanks.
ErrorDocument 503 "Our website is temporarily closed for scheduled maintenance."
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !http://example.com/myspeicifcpage$
RewriteRule .* - [R=503,L]
2
Answers
For your mentioned URLs you could try following, this will look for specific urls like
http://localhost:80/
orhttp://localhost:80/a
orhttp://localhost:80/b
.OR In case you want to get 503 for any page for domain name
example.com
then you could try following.You can use this :
This will print the error text on
/specificPage
if it is accessed.You can also markup the error message using html tags