I need to create a condition in my .htaccess file that will give a 404 when a user requests a file over HTTP, but not when they request it over HTTPS. I have about 15 files in the same directory that this needs to happen with (but not the others).
+1
A:
Use Redirect
with a status of 404
on those locations.
Ignacio Vazquez-Abrams
2010-10-19 20:24:42
part of my problem is writing the condition
andrhamm
2010-10-21 16:19:23
Ah, you're using `.htaccess` files. In that case you'll have to use mod_rewrite, with `RewriteCond` checking the value of `%{HTTPS}`. http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond
Ignacio Vazquez-Abrams
2010-10-21 16:29:08