This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'template_include', 'jp_template_override' ); | |
function jp_template_override( $template ) { | |
if ( is_page( 'home' ) ) { | |
$template = get_query_template( 'page' ); | |
} | |
return $template; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This class will add a custom query to the WordPress Rewrite rules. | |
* | |
* @author Jeremy Pry | |
*/ | |
class JPry_Sample_Rewrite { | |
/** | |
* Constructor function. Adds the rewrite rule to the 'init' hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* /(.*\.pdf) { | |
types { application/octet-stream .pdf; } | |
default_type application/octet-stream; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( $http_user_agent ~ "AppEngine-Google" ) { | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rewrite "^/files/(.*)" "/wp-content/uploads/$1" permanent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the default | |
<FilesMatch "\.(?i:pdf)$"> | |
ForceType application/octet-stream | |
Header set Content-Disposition attachment | |
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* /(.*\.pdf) { | |
types { application/octet-stream .pdf; } | |
default_type application/octet-stream; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( $args ~ idFoto ) { | |
rewrite mypoint/foto\.aspx$ /wp-content/uploads/legado/mypoint/$arg_idFoto.jpg? permanent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name 'filename.txt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H "Host: example.com" -I http://IP.ADD.RE.SS/path/to/file/or/folder/ |