Below are some examples of how to deal with 301 redirects in .htaccess
Place the example code below into .htaccess
/** | |
* Create HTML list of nav menu items and allow HTML tags. | |
* Replacement for the native menu Walker, echoing the description. | |
* This is the ONLY known way to display the Description field. | |
* | |
* @see http://wordpress.stackexchange.com/questions/51609/ | |
* | |
*/ | |
class Description_Walker extends Walker_Nav_Menu { |
add_action( 'wp_head', 'child_google_authorship', 99 ); | |
/** | |
* Add Google Authorship info to WP <head> | |
* | |
* @author Greg Rickaby | |
* @since 1.0.0 | |
*/ | |
function child_google_authorship() { ?> | |
<link rel="author" href="https://plus.google.com/XXXXXXXXXXXX/posts/">'; | |
<?php } |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
<a href="http://gregrickaby.com/go/genesis-theme" target="_blank"> | |
<img src="http://cdn.gregrickaby.com/affiliate/genesis_125x125.png" alt="Genesis Framework for WordPress" title="Genesis Framework for WordPress" border="0" /> | |
</a> | |
<a href="http://gregrickaby.com/go/thesis-theme" target="_blank"> | |
<img src="http://cdn.gregrickaby.com/affiliate/thesis_125x125.png" alt="Thesis Theme for WordPress" title="Thesis Theme for WordPress" border="0" /> | |
</a> | |
<a href="http://gregrickaby.com/go/headway-theme" target="_blank"> | |
<img src="http://cdn.gregrickaby.com/affiliate/headway_125x125.png" alt="Headway Theme for WordPress" title="Headway Theme for WordPress" border="0" /> |
<?php | |
add_action( 'wp_enqueue_scripts', 'child_load_google_fonts' ); | |
/** | |
* Enqueue Google Fonts using a function | |
*/ | |
function child_load_google_fonts() { | |
// Setup font arguments | |
$query_args = array( |
// | |
// Golden Ratio Typography | |
// -------------------------------------------------- | |
// Golden Ratio Math | |
// | |
// Let's do some math so we can build beautiful typography and vertical rhythm. | |
// For any magic to happen, set the $ContentWidth variable on _variables.scss | |
// to match your content box width (normally this is 640px, 740px, etc...). |
/* Reset | |
------------------------------------------------------------ */ | |
body#ttrssMain, | |
body#ttrssPrefs, | |
body#ttrssLogin, | |
body { | |
color: #000; | |
font-family: "Arial", sans-serif; | |
font-size: 100%; /* Set to default browser size, 16px */ | |
line-height: 1.5; |
<?php | |
// Do NOT include the opening php tag | |
// pre-html5 hook add_action( 'genesis_before_post_content', 'child_social_media_icons', 5 ); | |
add_action( 'genesis_before_entry_content', 'child_social_media_icons', 5 ); | |
/** | |
* Social Media Icons without a plugin | |
* | |
* Use conditional tags to place on desired posts and pages. | |
* |
/* Social Media Icons | |
------------------------------------------------------------ */ | |
.social-media-icons { | |
display: block; | |
height: 25px; | |
width: 100%; | |
margin: 0 0 10px; | |
padding: 0; | |
} |
Below are some examples of how to deal with 301 redirects in .htaccess
Place the example code below into .htaccess