![]() |
Redirecting site to temporary folder
I'm going to be updating one of my sites soon. The new site will be running on WordPress and I'd like to redirect users to a temporary site I have made while I get everything set up for my new site.
The temporary site is located in a folder called temp. I tried using htaccess to redirect anyone that goes to mydomain.com to mydomain.com/temp. My .htaccess file looks like this: Code:
DirectoryIndex test.phpHowever, now I have installed WordPress in the root folder of my domain even if I go to mydomain.com/index.php I am still redirected to the temp folder. What is the best way to do this so that I can still work on my site whilst users are redirected to the temp site |
Easiest thing to do ....
Keep the old site in the root directory and develop and test your new one in something like /dev or on a subdomain dev.domain.com, once everything works then move it over to the root :) It's much easier than trying to redirect this and that way and when its time to migrate you only need to update a few settings in wordpress, instead of messing around with htaccess |
Thanks, I was hoping there would be a simple way with .htaccess.
I'll just do it your way ^^ |
Here is what I do.
Currently I host more than one site on the same server so this is my structure. Code:
/Code:
/ |
That's a pretty good idea :)
How do you tell the server to use the 'site' folder as the main folder? htaccess? |
Quote:
If you're trying to do it directly on the Apache HTTP web server then you will need to edit the httpd.conf or vhosts.conf file and change the VirtualHosts. If you run into and issues there are many people here who can answer any questions about the VirtualHosts (or Control Panel). |
I'm using plesk but I'm not sure how to change the default folder, or even if it's possible.
I have a few sites on the same server so I need to make sure anything I change only changes for this account. |
| All times are GMT. The time now is 09:01 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0