Help with .htaccess

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi All

I need some .htaccess advice.  Can anyone help?

I need to take a site offline for a major upgrade, but want to be able
to surf to it myself to check progress etc.  So should I use
the .htaccess file to block everyone except my IP address?  Is this
the best way to do it, or is there an alternative?

To complicate things further I need to set the server/site to return a
503 status.  Can this be done in the .htaccess file?

so many questions, so little time

Re: Help with .htaccess

there is an echo in here

Re: Help with .htaccess

writing in news:a2c48d53-9dde-429c-a33f-08e12e8787d2

Quoted text here. Click to load it

You might want to think about not using a 503 and using a 302 instead,
and redirecting to a "maintenance" page.  That way, users will know what
is going on instead of getting a confusing 503 error message.

Adrienne Boswell at Home
Arbpen Web Site Design Services
Please respond to the group so others can share

Re: Help with .htaccess

Quoted text here. Click to load it

1) create a sub domain with a document root *next* to the current one
   (say htdocs-new next to htdocs)
2) install the site in the directory for the subdomain
3) test
4) mv htdocs htdocs-old
5) mv htdocs-new htdocs

(if you use a database and want to upgrade that as well it gets a bit more

John Bokma                            

AISE/AWW/SEO/web development forum: /

Re: Help with .htaccess

Quoted text here. Click to load it

thanks John, that is the main problem, it has database, email
connections and absolute paths in the links, plus a back end CMS style
interface.  I'll have a look though and see what I can do.

The main reason for the 503 is for Google and other search engine
bots, telling them that the site is under maintenance and to come back
later, instead of them indexing the "under construction" page and
dropping all the others.

Site Timeline