lock down files
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
2 changed files
with
2 additions
and
15 deletions
| ... | @@ -25,11 +25,8 @@ RewriteRule . /index.php [L] | ... | @@ -25,11 +25,8 @@ RewriteRule . /index.php [L] |
| 25 | # require login for media files | 25 | # require login for media files |
| 26 | # more info: https://m0n.co/11 | 26 | # more info: https://m0n.co/11 |
| 27 | <IfModule mod_rewrite.c> | 27 | <IfModule mod_rewrite.c> |
| 28 | 28 | RewriteCond %{REQUEST_URI} (\.pdf|\.docx|\.xlsx|\.ppt|\.jpg)$ [NC] | |
| 29 | RewriteCond %{REQUEST_URI} (\.pdf|\.docx|\.xlsx|\.ppt)$ [NC] | 29 | RewriteCond %{HTTP_COOKIE} !wordpress_logged_in_([a-zA-Z0-9_]*) [NC] |
| 30 | |||
| 31 | RewriteCond %{HTTP_COOKIE} !stc_logged_in [NC] | ||
| 32 | |||
| 33 | RewriteRule (.*) https://stellervistaconnect.com/ | 30 | RewriteRule (.*) https://stellervistaconnect.com/ |
| 34 | </IfModule> | 31 | </IfModule> |
| 35 | 32 | ... | ... |
| ... | @@ -270,13 +270,3 @@ add_action( 'init', 'wpa_91930' ); | ... | @@ -270,13 +270,3 @@ add_action( 'init', 'wpa_91930' ); |
| 270 | 270 | ||
| 271 | 271 | ||
| 272 | 272 | ||
| 273 | add_action( 'wp_login', 'add_custom_cookie' ); | ||
| 274 | function add_custom_cookie() { | ||
| 275 | setcookie( 'stc_logged_in',rand(5, 15), time()+WEEK_IN_SECONDS ); | ||
| 276 | } | ||
| 277 | |||
| 278 | // To Remove Cookie | ||
| 279 | add_action( 'wp_logout', 'remove_custom_cookie' ); | ||
| 280 | function remove_custom_cookie() { | ||
| 281 | setcookie( 'stc_logged_in', '', -1000000 ); | ||
| 282 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment