I have a wordpress website footballfriendsonline.com and it has almost 22,000 blog posts running with SEO google analytics for the past 6 years, all the contents are scattered in almost all social media and backlinked in a lot of websites. The issue is I'm planning to start afresh news aggregator site with the same old web address 1 I want to move the old blog contents to the subdirectory ie footballfriendsonline.com/blog and I want to run the same old blogging in 2 without affecting the SEO and also want to run the fresh startup aggregator site in 1 .
I tried with 301 redirections by updating .htaccess file and I failed in getting desired output.
Anyone, please help me with this...
You can do that.. Transparently redirect your root directory to a subdirectory...
Add the following code to the .htaccess file:
RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?footballfriendsonline.com$ RewriteCond %{REQUEST_URI}.^/blog/ RewriteCond %{REQUEST_FILENAME}.-f RewriteCond %{REQUEST_FILENAME}?-d RewriteRule ^(.*)$ /subdirectory/$1 RewriteCond %{HTTP_HOST} ^(www?).footballfriendsonline.com$ RewriteRule ^(/)?$ blog/index.php [L]
this will work for you. please check...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.