Forums

HTACCESS redirection (1 post)

  1. designrf
    Member
    Posted 1 year ago #

    Hi all,

    We are using wordpress multisite for a website.
    We have some url that we need to redirect to new one.
    We have tried few htaccess redirection but nothing work.

    The last line is the redirection that we cannot make works.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    #redirect mobile browsers
    RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
    RewriteRule ^(.*)$ http://www.ourdomain.co.uk/blog [R=301,L]
    RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
    RewriteRule ^(.*)$ http://www.ourdomain.co.uk/blog [R=301,L]
    RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$
    RewriteRule ^(.*)$ http://www.ourdomain.co.uk/blog [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^ourdomain.co.uk$
    RewriteRule ^(.*) http://www.ourdomain.co.uk/$1 [QSA,L,R=301]
    
    # 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).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    RewriteCond %{QUERY_STRING} page=135
    RewriteRule ^index\.php$ http://www.ourdomain.co.uk/about-us/$1? [R=301,L]

    Do you have any ideas?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags