Execute php file?

Using a single web hosting account to host multiple sites

Execute php file?

Postby high6 » Wed Mar 04, 2009 2:20 pm

I want to setup a mask for ip and if my pc is offline then not use the mask.

Like I have

RewriteEngine on
RewriteCond %{HTTP_HOST} ^site.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.site.com$ [NC]
RewriteRule ^high6$ "http\:\/\/x\.x\.x\.x\:8080\/" [P,NC,L]

which works fine.

But can I have it ping my ip first with a php file and if I am offline give a message that I am instead of redirecting?
high6
 
Posts: 5
Joined: Wed Mar 04, 2009 1:27 pm

Postby richardk » Thu Mar 05, 2009 11:24 am

But can I have it ping my ip first with a php file and if I am offline give a message that I am instead of redirecting?

Do you have access to the httpd.conf file?

Try (no PHP file required)
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteCond http://1.2.3.4:8080/ -U
RewriteRule ^high6$ http://1.2.3.4:8080/ [NC,P,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 13 guests

cron