0

everyone.

I am working on a website based on Yii2 through localhost. I want to add changes i made to the actual server. But i want to keep the old version and new version of the website working together.

What i mean: if i type

http://url.com

i access the old version and when i type

http://url.com/something

i access the new version.

How can i accomplish this?

Thanks in advance.

1
  • could you be more specific? i really can't understand, what you want to achieve. both sites are working and editable on different urls, ok? one url points to one site, second url points to another one. what is the problem?
    – Evgeniy
    Oct 15, 2015 at 7:32

2 Answers 2

1

Simple, make a subdomain: http://www.url.com and http://old.url.com.

This way

  • Your document_root variables will stay intact
  • You don't need to prefix '/something/' to all your resources
  • http://www.url.com/something remains accessable in case you (unforseenly) need it
0
  1. Go to your web dir and copy entire page.
  2. Make a new folder and name it something
  3. Paste the entire web in that folder.
  4. When you go on www.example.com you'll have one page, when you go on www.example.com/something, you'll go on this bacukped or newly created page.

BUT

when doing that and before doing any actual changes, backup your database also.

hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.