• Hallo,

    I’m putting together some multisites I had into one big multisite, the thing is that I want to make 301 redirections. For example:

    From: https://ritort.net
    To: https://ritort.org/organs-de-govern/fundador/entorn/

    I tried this .htaccess configuration:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^ritort.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www.ritort.net$
    RewriteRule ^/$ https://ritort.org/finalitats/$1 [R=301,L]
    
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    But it didn’t work. Any idea?

    Many thanks!

  • The topic ‘.htaccess 301 redirection’ is closed to new replies.