Forum Moderators: phranque

Message Too Old, No Replies

Apache server-level redirects

Installing anti-phishing redirect in server config

         

JonT

10:07 am on Oct 12, 2009 (gmt 0)

10+ Year Member



Hi

I want to create some method of redirecting phishing sites to the APWG/CUPS anti-phishing page at [education.apwg.org...]

I know that I can do this on a per folder basis using .htaccess

<Files \.htaccess>
order allow,deny
deny from all
</Files>
Redirect 301 / [education.apwg.org...]

However, I ideally would like to do this server-side, where it can't be modified or deleted by a user or a script.

I've tried creating a new conf file in the /sites/*.conf directory that Apache2 uses:

<VirtualHost *>
Redirect permanent url/of/phishing/site [education.apwg.org...]
Redirect permanent url/of/phishing/site [education.apwg.org...]
</VirtualHost>

but this doesn't seem to work.

Does anyone know of a way that I can get this running where only I can mange it and no-one else can modify any entries I make?

Caterham

10:31 am on Oct 12, 2009 (gmt 0)

10+ Year Member



I've tried creating a new conf file in the /sites/*.conf directory that Apache2 uses:

You should put that into your existing httpd.conf outside of <virtualhost > sections if it should apply to all hosts.

JonT

12:24 pm on Oct 12, 2009 (gmt 0)

10+ Year Member



Thanks. Added "Include /full/path/to/phishing_redirects.conf" to the master httpd.conf file, and in the phishing_redirects.conf file I'm using Directory directives

<Directory "/full/path/to/phishing/site/directory/or/file">
Redirect permanent / [education.apwg.org...]
</Directory>

and that's done the job.