Simple URL rewriting gone wrong

First I would take it out from the WordPress block rules, as it will be overwrited when permalinks are refreshed if you don’t add the rule to Rewrite API. Then you could add at the bottom of your htaccess something like: Redirect 301 feed/sejururi.xml http://yoursite.com/feed/

Change the search URL

From WPEngineer (with edits): Add the following to functions.php in your theme: function fb_change_search_url_rewrite() { if ( is_search() && ! empty( $_GET[‘s’] ) ) { wp_redirect( home_url( “/busca/?s=” ) . urlencode( get_query_var( ‘s’ ) ) ); exit(); } } add_action( ‘template_redirect’, ‘fb_change_search_url_rewrite’ ); Add the following to your htaccess file: RewriteCond %{QUERY_STRING} ^s=(.*)$ [NC] RewriteRule … Read more

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

Using 2 URL’s for WordPress

You can define the URLs by constants added in your wp-config.php. I suppose you already set up your System in the way that both domains point to the same WordPress installation. Now the only thing you need to check is which Domain is actually used. Your WordPress installation contains the first URL in the database, … Read more