Redirecting domains in local server with WordPress installations

I am using Uniserver as local server and have several sub-directories under www that simulate each one a different domain.

Example:

Read More

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.

Related posts

Leave a Reply

1 comment

  1. Let Uniserver do the work for you:

    Create a Virtual Host opening Server 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) and Site Address (URL) replacing the actual URLs with http://wptest

    Restart WP.

    That’s all. Now the virtual WordPress site is accessed at http://wptest

    Repeat the same steps for each subdirectory.