Combining Multiple Taxonomies in one URL

This rewrite rule should work (assuming “brand” and “type” are the taxonomy registered names): function custom_rewrite_rules() { add_rewrite_rule(‘^brand/(.*)/type/(.*)?’, ‘index.php?brand=$matches[1]&type=$matches[2]’, ‘top’); } add_action(‘init’, ‘custom_rewrite_rules’); Remember to flush the rewirte rules after saving this code in your site. Then you will need to hook in several places to fix things. For example, you may need to hook … Read more

Use subdomain for certain urls

Try this (untested): # BEGIN Forums Rewrite RewriteCond %{HTTP_HOST} !^www\.domain.com RewriteCond %{HTTP_HOST} ([^.]+)\.domain.com RewriteRule ^(.*)$ forums/%1 # END Forums Rewrite It should work with both your requirements. You don’t need the second one (rewriting the forums folder to subdomain) because rewriting the actual forum ID will override the basic subdomain rewriting forums.domain.com/forumid=16. You should add … Read more

Use a different domain for SSL

Just to keep things nice & clear, I’ve posted this as a new answer. Let’s reset the playing field & follow the below instructions as if it were a shiny new install (ignore all code & suggestions in previous answers). In your wp-config.php define( ‘WP_SITEURL’, ‘http://www.realdomain.com/blog’ ); define( ‘SSL_DOMAIN_ALIAS’, ‘realdomain.maindomain.net’ ); define( ‘FORCE_SSL_LOGIN’, true ); … Read more

Does this .htaccess security setting really work?

It appears to prevent any POST requests to wp-login.php that aren’t made from a page on my-domain.com. When the browser sends a POST request, say after submitting a form, it will include a HTTP Referrer header telling the server where the request came from. This theoretically prevents bots submitting POST requests directly to wp-login.php as … Read more

WordPress site hacked. Has .htaccess been hacked?

About Hacked sites: First of all, let’s be clear about issues related to hacking: If your site was genuinely hacked, then in short of completely erasing all the files and then reinstalling the server (not just WordPress) with new passwords, updating all files and identifying and removing previous loop holes that caused the site to … Read more

Passing parameters to a custom page template using clean urls

add_rewrite_rule() allows you to turn the pretty url into variables. numbers: (\d*) section: /rid/ or /pageid/ slug: ([a-zA-Z0-9-]+ Here is a class to register the rewrite and handle the request if a match has been found. <?php if ( ! class_exists( ‘CPTURLRewrite’ ) ): class CPTURLRewrite { const ENDPOINT_QUERY_NAME = ‘pageid’; const ENDPOINT_QUERY_PARAM = ‘__pageid’; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)