1
peterr
Best method to update site ??
  • 2007/4/17 6:31

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Due to some attempted hacking recently, decided to completely redo the website (plus add the protector module), and this has been loaded/installed in a seperate site.

At present people just see the usual msg for a site 'turned off'

Quote:

The site is currently closed for maintainance. Please come back later.


I now need to move everything to the (real) website, but as there are thousands of files, the upload isn't going to happen in a split second.

I'd like to bar access completely whilst all the new files are loaded, etc. Is simply modifying .htaccess the best way to do this as follows ..

order allow,deny
allow from my
.ip.add.res
deny from all


That way, no one can even reach it, until I have finished the move. It seems the only 'path' to change is in mainfile.php and in the system preferences.

Does that sound okay ??
NO to the Microsoft Office format as an ISO standard.
Sign the petition

2
irmtfan
Re: Best method to update site ??
  • 2007/4/18 2:46

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


i found this article useful. take a look and follow it step by step.

3
peterr
Re: Best method to update site ??
  • 2007/4/18 4:16

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Thanks, that is a very good article.

I like the idea of the temporary index.html, but in my case, there is a chance that the site will be accessed during the uploading of all the files, people trying to access various modules.

I need to keep them out completely until I have checked everything.
NO to the Microsoft Office format as an ISO standard.
Sign the petition

4
gestroud
Re: Best method to update site ??
  • 2007/4/18 4:36

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


First, I would back everything up.

Then I would create a subdomain for the site and have the path to the XOOPS site I'm working on point to the subdomain.

Next, I would create a directory that the original url pointed to and and put an index.html file in there.

Next I would change the path in my mainfile.php to point to the new path to the subdomain. (Hopefully, you don't have anything hardcoded into your theme or module templates that point to the old url or path.)

Now you can work on your site/subdomain in peace.

When you're done,

1. Back up your work (but don't overwrite your first backup.)

2. Restore the original path to your site's url.

3. Change the path in mainfile.php to its original designation.

4. Get rid of the subdomain.

Usually works for me. Usually

gestroud

5
peterr
Re: Best method to update site ??
  • 2007/4/18 4:46

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Thanks, I had basically done that, as was now up to the 'when you are done' stage.

I'm going to keep the other site all setup, as it has a seperate db, and I can use it to try out new modules, or troubleshoot something, etc.

As well as the path to change in mainfile.php, there is the db, which also has the path name, so it just needs a quick "admin/ general prefs" change (I think that is where it is).

Thanks. :)
NO to the Microsoft Office format as an ISO standard.
Sign the petition

6
gestroud
Re: Best method to update site ??
  • 2007/4/18 4:47

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


OOPS! Missed a step. You'll also have to change your site's url in mainfile.php fromhttp://mysite.com tohttp://mysubdomain.mysite.com and then change it back when you're done. Also, don't forget to change to permissions to a secure setting when you're done.

gestroud

7
peterr
Re: Best method to update site ??
  • 2007/4/21 8:49

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


I found out I had the .htaccess incorrect, to block all users except my IP it is

Order Deny,Allow
Deny from all
Allow from my
.ip.add.res
NO to the Microsoft Office format as an ISO standard.
Sign the petition

Login

Who's Online

184 user(s) are online (101 user(s) are browsing Support Forums)


Members: 0


Guests: 184


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits