Support » Fixing WordPress » WordPress rewrite issue

  • I’m trying to get:

    domain.com/video*

    forwarded to

    domain.com/blog/video*

    I tried adding this line to the bottom of my .htaccess with no luck:

    RewriteRule ^video(.*) blog/video

    I also tried adding this to my functions.php:

    add_action( 'init', 'rewrites_init' );
    function rewrites_init(){
        add_rewrite_rule(
            'video(.*)',
            'blog/video',
            'top' );
    }

    But I still get a 404 error. Thanks.

Viewing 1 replies (of 1 total)
  • In root folder of domain .htaccess file at very top:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^/video/(.*)$ http://www.yoursite.com/blog/video/$1 [L,R=301]
    </IfModule>

    you can leave the www. out…

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress rewrite issue’ is closed to new replies.