Hi,
Please follow this article https://premium.wpmudev.org/blog/install-wordpress-subdirectory/ to install your site in sub directory.
Thanks
Mohammad
1) After Installing the wordpress in root folder, move EVERYTHING from root folder into subdirectory. – i installed the WordPress in subdirectory
And i tried this code <IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/my_subdir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /my_subdir/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ my_subdir/index.php [L]
</IfModule> but still, it does not work, the website still redirect to http://www.example.com/NewWebsite
I tried everything, from both the articles but still not working, the website still redirect to http://www.example.com/NewWebsite.
I have run-out of options, and the worst part is that this is a client’s website.
Andrea
The Incredible Code Injector
621 pts 470 pts LEVEL 5
I usually do a subfolder installation when there is already a website in the root and I need to make a new website starting from scratch.
in this way I can keep the old site live till the new one is ready and tested (in coming-soon mode), and then in a matter of minutes I delete the old site from the root and I set up the new one to be viewed as if it was in the root (same technique as explained in this article).
I found this comment from this article https://premium.wpmudev.org/blog/install-wordpress-subdirectory/ , n that’s exactly what i did on the domain, but after deleting the old website files, and replaced with the new files, the website started redirecting to http://www.example.com/NewWebsite