Changeset 446122
- Timestamp:
- 10/01/2011 12:10:48 PM (15 years ago)
- Location:
- wp-htaccess-control/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (3 diffs)
-
wp-htaccess-control-ui.php (modified) (1 diff)
-
wp-htaccess-control.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-htaccess-control/trunk/readme.txt
r428753 r446122 7 7 Requires at least: 2.7 8 8 Tested up to: 3.2.1 9 Stable tag: 2. 69 Stable tag: 2.7 10 10 11 11 Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress. … … 32 32 * Disable directory browsing; 33 33 * Disable and redirect image hotlinking; 34 * Disable and redirect file hotlinking; 34 35 * Force canonical url (WWW or non-WWW); 35 36 * Limit maximum file upload size; … … 74 75 == Changelog == 75 76 77 = 2.7 (01/10/2011) = 78 * *Feature:* added option to "Disable file hotlinking" (thank you for the suggestion Syamsul Alam); 79 * *Fix:* fixed erroneous description of the "Disable image hotlinking" option: if no redirection is to be done "_" should be input instead of "-". 80 76 81 = 2.6 (23/08/2011) = 77 82 * *Feature:* added option to remove author base (good idea gavinhamm). -
wp-htaccess-control/trunk/wp-htaccess-control-ui.php
r428746 r446122 360 360 </tr> 361 361 <tr valign="top"> 362 <th scope="row"><?php _e('Disable hotlinking', 'wp-htaccess-control'); ?></th>362 <th scope="row"><?php _e('Disable image hotlinking', 'wp-htaccess-control'); ?></th> 363 363 <td style="width:3%;"> 364 364 <input type="text" name="WPhtc_disable_hotlink" value="<?php echo $WPhtc_data['disable_hotlink']?>"/> 365 365 </td> 366 366 <td valign="middle"> 367 <p class="description"><?php _e('If set, this url will be used as redirection to hotlinked images (you should be using an image url here). If you prefer no output on hotlinked images use "-".', 'wp-htaccess-control'); ?></p> 367 <p class="description"><?php _e('If set, this url will be used as redirection to hotlinked images (you should be using an image url here). If you prefer no output on hotlinked images use "_".', 'wp-htaccess-control'); ?></p> 368 </td> 369 </tr> 370 <tr valign="top"> 371 <th scope="row"><?php _e('Disable file hotlinking extensions', 'wp-htaccess-control'); ?></th> 372 <td style="width:3%;"> 373 <input type="text" name="WPhtc_disable_file_hotlink_ext" value="<?php echo $WPhtc_data['disable_file_hotlink_ext']?>"/> 374 </td> 375 <td valign="middle"> 376 <p class="description"><?php _e('If set, this file extensions will not be hotlinkable.', 'wp-htaccess-control'); ?></p> 377 <p class="description"><?php _e('Separate different extensions with a white-space, ie: "pdf doc zip".', 'wp-htaccess-control'); ?></p> 378 </td> 379 </tr> 380 <tr valign="top"> 381 <th scope="row"><?php _e('File hotlinking redirection', 'wp-htaccess-control'); ?></th> 382 <td style="width:3%;"> 383 <input type="text" name="WPhtc_disable_file_hotlink_redir" value="<?php echo $WPhtc_data['disable_file_hotlink_redir']?>"/> 384 </td> 385 <td valign="middle"> 386 <p class="description"><?php _e('If set, this url will be used as redirection for hotlinked files.', 'wp-htaccess-control'); ?></p> 368 387 </td> 369 388 </tr> -
wp-htaccess-control/trunk/wp-htaccess-control.php
r428746 r446122 4 4 Plugin URI: http://dardna.com/wp-htaccess-control 5 5 Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress. 6 Version: 2. 66 Version: 2.7 7 7 Author: António Andrade 8 8 Author URI: http://dardna.com … … 395 395 $new_rules.="\n# WPhtC: Disable image hotlinking\n"; 396 396 $new_rules.="<IfModule mod_rewrite.c>\n"; 397 $new_rules.="RewriteEngine On\n";397 $new_rules.="RewriteEngine on\n"; 398 398 $new_rules.="RewriteCond %{HTTP_REFERER} !^$\n"; 399 $new_rules.="RewriteCond %{HTTP_REFERER} !^http ://(www\.)?".str_ireplace(array("http://","www."),"",get_bloginfo("url"))."/.*$ [NC]\n";399 $new_rules.="RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?".str_ireplace(array("http://","www."),"",get_bloginfo("url"))."/.*$ [NC]\n"; 400 400 $new_rules.="RewriteRule \.(jpg|jpeg|png|gif)$ ".$WPhtc_data['disable_hotlink']." [NC,R,L]\n"; 401 $new_rules.="</IfModule>\n"; 402 } 403 if($WPhtc_data['disable_file_hotlink_ext']){ 404 $redir = $WPhtc_data['disable_file_hotlink_redir'] ? $WPhtc_data['disable_file_hotlink_redir'] : "_"; 405 $new_rules.="\n# WPhtC: Disable file hotlinking\n"; 406 $new_rules.="<IfModule mod_rewrite.c>\n"; 407 $new_rules.="RewriteEngine on\n"; 408 $new_rules.="RewriteCond %{HTTP_REFERER} !^$\n"; 409 $new_rules.="RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?".str_ireplace(array("http://","www."),"",get_bloginfo("url"))."/.*$ [NC]\n"; 410 $new_rules.="RewriteRule \.(".str_replace(" ","|",$WPhtc_data['disable_file_hotlink_ext']).")$ ".$redir." [NC,R,L]\n"; 401 411 $new_rules.="</IfModule>\n"; 402 412 } … … 613 623 $WPhtc_data['protect_comments']=$_POST['WPhtc_protect_comments']; 614 624 $WPhtc_data['disable_hotlink']=trim($_POST['WPhtc_disable_hotlink']); 625 $WPhtc_data['disable_file_hotlink_ext']=trim($_POST['WPhtc_disable_file_hotlink_ext']); 626 $WPhtc_data['disable_file_hotlink_redir']=trim($_POST['WPhtc_disable_file_hotlink_redir']); 615 627 $WPhtc_data['redirect_500']=trim($_POST['WPhtc_redirect_500']); 616 628 $WPhtc_data['redirect_403']=trim($_POST['WPhtc_redirect_403']);
Note: See TracChangeset
for help on using the changeset viewer.