Updating, recompiling, VirtualHost templates, customizations, php safemode …Hotlink protection: How-To prevent people from stealing your files
Updating, recompiling, VirtualHost templates, customizations, php safemode …Hotlink protection: How-To prevent people from stealing your files
NowCreate an .htaccess file in your public_html directory with the following codes:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC]
RewriteRule .(gif|jpg)$ – [F]
Where domain.com is your domain absolutely.
Similarly, you can Place this up to allow only a list of multiple domains:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain1.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain2.com.*$ [NC]
RewriteRule .(gif|jpg)$ – [F]
Where the logics reads
Hotlink
How to forward a website to into another url
the simplest to understand is to use php., but There are several ways to accomplish this task,
To do this, you need to create the page that will do the forwarding. This can be any page, as long as it ends in “.php”. If you are trying to redirect a domain, you will create “index.php” inside the public_html directory.
Now Once you decide which page you will use, then create a file and enter the following text:
<?php
header(“Location: http://whereyouwant.com/to/go.html“);
?>
Where http://whereyouwant.com/to/go.html is the location that you want the page to forward to. You can use local values, ie: /page.html, or full urls as in the above example (http://..etc.)
Another for accomplishing this is to use an .htaccess file in the public_html directory. Sample contents:
Redirect 301 / http://whereyouwant.com/to/go.html
which it will generate a similar result as the index.php Location redirect.
How to downgrade from apache 2 back to apache 1.3
If you decide to go back to apache 1.3 after installing apache 2, you will need to do the following:
1) old httpd.conf file should be Restore :
cp -f /etc/httpd/conf/httpd.conf.1.3.backup /etc/httpd/conf/httpd.conf
2) Get DirectAdmin to use the old httpd.conf files for the users.
Edit the /usr/local/directadmin/conf/directadmin.conf file and change the apache_ver=2.0 to apache_ver=1.3.
Also, if you are using custombuild, and are going back to customapache, the apache_conf value needs to be reset to:
apacheconf=/etc/httpd/conf/httpd.conf
Then type
3) you can recompile apache 1.3 Now
rm -f /usr/lib/apache/*
cd /usr/local/directadmin/customapache
./build clean
./build all
4) Fix the module link:
cd /etc/httpd
rm -f modules
ln -s /usr/lib/apache modules
5) the old boot script should be Restore :
FreeBSD:
cp -f /usr/local/directadmin/customapache/httpd_freebsd /usr/local/etc/rc.d/httpd
chmod 755 /usr/local/etc/rc.d/httpd
/usr/local/etc/rc.d/httpd restart
RedHat:
cp -f /usr/local/directadmin/customapache/httpd /etc/init.d/httpd
chmod 755 /etc/init.d/httpd
/etc/init.d/httpd restart