This is question has been asked but the answers were not clear. I have 2 directories in my root folder www.mysite.com/old & www.mysite.com/new

I would like to redirect all the http requests to www.mysite.com/new but I do not want the URL to display /new/

I did manage to do it by creating an .htaccess file in the root directory with the following code:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !(.*)new
RewriteRule ^(.*)$ new/$1 [L]

However the redirect works and it takes away the /new/ directory but when I click on a link the URL path changes back to www.mysite.com/new/mypage.php

The /new/ directory contains a WordPress site if that might be the problem, however there are no other .htaccess files in any other directory only in the root.

I would appreciate any advice a lot.

Thank you

Read more here: Redirecting and Changing URL path (.htaccess)


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: