I am using Uniserver as local server and have several sub-directories under www
that simulate each one a different domain.
Example:
http://localhost/WPTest/
is the WPTest site where there is a WordPress installation
http://localhost/WPTest1/
is the WPTest1 site where there is another WordPress installation
What I would like to do and haven’t been able, is to redirect http://localhost/WPTest/
just to http://WPTest
and http://localhost/WPTest1/
just to http://WPTest1
, etc.
I will appreciate any help to do this or at least to tell me if it’s possible.
Let Uniserver do the work for you:
Create a
Virtual Host
openingServer Configuration -> Apache -> Apache Vhosts
Enter the
Document Root
path (i.e. ./whatever/www/WPTest).Enter the
Server Name
(i.e. “wptest”). Use lower case only.Select
Confirm
Restart Apache Server.
Now in WordPress, go to
http://localhost/WPTest/wp-admin
.In
Settings -> General
, modify:WordPress Address (URL)
andSite Address (URL)
replacing the actual URLs withhttp://wptest
Restart WP.
That’s all. Now the virtual WordPress site is accessed at
http://wptest
Repeat the same steps for each subdirectory.