Redirect not working

Try this: RewriteRule ^(freebooks)$ $1/index.php?p=5&min_price=0&max_price=0 [NC,L] or just RewriteRule ^freebooks$ freebooks/index.php?p=5&min_price=0&max_price=0 [NC,L]

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]

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’); }

Apache rewrite rules and wordpress problem

After weeks of fiddling around and trying all sorts of tricks, I finally figured it out. There we’re two things I was doing wrong, I wanted wordpress to be able to access get last two value’s in between slashes as GET parameters when an url like this /examentraining/vak/VAKNAME/LEVELNAME/ is submitted to WordPress. p=1316&vakname=VAKNAME&level=LEVELNAME => /examentraining/vak/VAKNAME/LEVELNAME/ … Read more

htaccess redirect for all categories converted to tags now showing 404

Heree’s a code solution, not htaccess. This first checks if current query is for a category page, then checks category existence, and if category not exists but a tag with the same name, it redirects to the tag page. add_action(‘parse_request’, ‘wpse_parse_request’); function wpse_parse_request( $r ){ if( isset($r->query_vars[‘category_name’]) ) { $cat = get_term_by(‘slug’, $r->query_vars[‘category_name’], ‘category’); if( … Read more

WordPress 302 Redirect to Holding Page

I would place the redirect inside WordPress. It lends you more control, and you don’t need to worry about WP conflicting with your own .htaccess rewrites anymore. function wpse_147377_redirect_to_holding() { if ( ! is_page( ‘holding’ ) ) { wp_redirect( site_url( ‘holding’ ) ); exit; } } add_action( ‘template_redirect’, ‘wpse_147377_redirect_to_holding’ ); Place it in a “Must … Read more

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