In my httpd.conf I have:
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>
And in my .htaccess file I have:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.
I have the following htaccess file for your consideration:
Options +FollowSymlinks
#+FollowSymLinks must be enabled for any rules to work, this is a security #requirement of the rewrite engine.
I'm setting up a quick internal project in a new addon domain in cPanel. This particular one has an SSL cert installed. I was building my .htaccess up and added a <Files config.php> directive to deny from all so that my config.php file isn't accessible.
I've got multiple named vhosts on an Apache web server (CentOS 5, Apache 2.2.3).
Each vhost has their own config file in /etc/httpd/vhosts.d and these vhost config files are included from the main httpd conf with...
I am attempting to control redirections on my site using the Apache vhosts config.
I have two-letter regions setup, such as /fr, /de, /es, which I am currently ignoring as you will see from my vhosts file below.
could you help me to convert this rewrite rule from apache2 to lighttpd
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://my-site\.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www\.my-site\.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://player\.my-site\.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://stream\.my-site\.net/ [NC]
RewriteRule .* - [L,R=404]
Thank you
what is the best possible way to redirect and rewrite url in virtual host file?
I want to make sure it is not heavy on the server.
I tried many ways on the virtualhost file but when I restart the apache it fails. I dont want to use .htaccess...
I know there are a number of different ways to redirect using apache although I wanted to check if this is the correct way of doing it via virtual host?
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example/public
<Directory "/var/www/example/public">
Options +FollowSymlinks
# Prevent Direct Access to files
<FilesMatch "\.
I use hotlink protection in Nginx and it is working very well!
For some reason - and the reason for this question - it is not allowing visitors to my site using firefox to see any images, which they should. For IE, Chrome, Safari, and Opera, it works just fine. Images show up on my site but not if you try to hotlink.
I checked Firefox on Win and on Mac and it happens in both places.