htaccess redirectmatch exclude directory

I currently have a htaccess redirect set up on my website (as advised by site hosters) :-

RedirectMatch permanent ^/$ http://www.somewebsite.com/photos/
ErrorDocument 404 /photos/index.php?/page/404_not_found

I’m now looking to migrate to wordpress, but want to be able to build the wordpress site first & get the htacess to ignore a redirect for wordpress.somewebsite.com

Read More

I’ve tried a number of update to the htaccess but don’t seem to be able to get the syntax correct

Any help greatfully received

Regards

Related posts

1 comment

  1. Change your rule to this:

    ErrorDocument 404 /photos/index.php?/page/404_not_found
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} !wordpress [NC]
    RewriteRule ^/?$ http://www.somewebsite.com/photos/ [L,R=301]
    

    Make sure to clear your browser cache before testing.

Comments are closed.