Migration from old CMS to WordPress 301 redirection rules?

I made modification of rules, now it is working fine. #For post page URLs RewriteRule ^(.*)-some-category-suffix(.*)-some-category-suffix(.*).jpg.html(.*)$ /category-url/$1$2$3.html [L,R=301] #For post add-on page URLs RewriteRule ^(.*)full-size/(.*)-some-category-suffix(.*)-some-category-suffix(.*).jpg-(.*)(.*).html$ /category-url/$1$2$3$4.html?-$5$6 [L,R=301] #Category URLs RewriteRule ^(.*)-some-category-suffix(.*)-some-category-suffix(.*)$ /category_url/$1$2$3 [L,R=301]

Taxonomy Parent not showing up in address bar

I found an answer within 10 minutes of posting this. 🙂 Just add ‘hierarchical’ => true in the rewrite=>array() of the taxonomy as follows: $args = array( … ‘hierarchical’ => true, ‘rewrite’ => array( ‘slug’ => ‘THE-CHOSEN-SLUG’, ‘hierarchical’ => true, ), ); register_taxonomy( ‘my-custom-taxonomy’, array( ‘page’, ‘my-custom-post-type’ ), $args ); Then flush the rewrite rules … Read more

Remove index.php from WP 8.0 install migrated to IIS from Apache (still detecting Apache server)?

WP has global $is_iis7 variable, which is filled via following code: $is_iis7 = $is_IIS && intval( substr( $_SERVER[‘SERVER_SOFTWARE’], strpos( $_SERVER[‘SERVER_SOFTWARE’], ‘Microsoft-IIS/’ ) + 14 ) ) >= 7; If detection is not working correctly likely something is going wrong with this line, such as server vars not being filled with the info expected.

WordPress URL rewrite problem

My recommendation is to register a custom post type. You can call it products, and then all posts placed under Products will get the http://domain.com/products/some-product rewrite. Once it’s its own post type, you can specify a custom template for it, single-product.php, and you can add any custom fields, classes, etc. from there.

Rewrite Question

You can handle rewrites in a plugin or in your theme’s functions.php. I think something like this might work (assuming attachment_id and attachment_category are registered tags/variables. <?php add_action(‘init’, ‘myplugin_rewrite_rule’); function myplugin_rewrite_rule() { add_rewrite_rule(‘^portfolio/([^/]*)/([^/]*)/?$’, ‘index.php?attachment_id=$matches[1]&attachment_category=matches[2]’, ‘top’); }