• hello , i need some thing to help me , open my wordpress posts as 2 url in same time but with 1 canonical url in yoast seo just like this :

    site.com/postid/postname.hml & site.com/postid/namepost.hml

    or

    site.com/1560/posturl1.html & site.com/1560/posturl2.html

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    If you setup local rewrite rules in .htaccess, the process will not change the browser’s URL. To avoid numerous rules, the alias to real naming should follow a standard formula. That part works, but WP will insist on redirecting to the proper canonical URL anyway. I think the WP part of this can be suppressed through the “redirect_canonical” filter. Untested, do a proof of concept before spending much time on this.

    Thread Starter nightdark

    (@nightdark)

    is there any rewrite code for .htaccess to hook page with site.com/testurl.html and show it with out change any thing on url : site.com/urlhooked.html ?

    Moderator bcworkz

    (@bcworkz)

    If the destination does not include https:// and domain, that it’s a relative path, the change is not reflected in the browser’s address bar. For example:
    RewriteRule ^foo-(.*)$ /bar-$1 [R=301,NC,L]

    will send request “example.info/foo-hello/” to canonical “example.info/bar-hello/” while the address bar remains the former. You do need a full rewrite block to go with the rule. engine on, base, and maybe some conditions. Look at the rewrite block that WP adds for a full example.

    A detailed description of what all the default WP rewrite block does can be found here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to open wordpress post with 2 url at the same time’ is closed to new replies.