PDA

View Full Version : how to turn off webite so that no file is accessible


o0O0o.o0O0o
04-08-2008, 07:30 AM
hi

I have to transfer a website to new server.

On the weekend i will stop the website , download the database
and then upload the datase to new server

and then change the name servers



How can i amke website inaccessible for that period of time.
If i chnage the index.php file , other files will be their

Do i have to move the home directory

Any other alternative way

Leeoniya
04-08-2008, 07:38 AM
if you REMOVE the index.php file and your sever is not properly configured, it MAY give a directory listing.

just change your index.php to something like
<?php echo 'Moving server!'; ?>

Leon

abduraooft
04-08-2008, 07:45 AM
and then change the name servers
It may take 15-30 hours to get your site when you change the name servers. During that prorogation delay time, your site won't be accessible.

Or if you are using apache, then you can always display a page when some one try to access any other page on your server by putting an htaccess file likeRewriteEngine On
RewriteRule !(^moving\.php$) http://www.domain.com/moving.php [R=301]

o0O0o.o0O0o
04-08-2008, 08:15 AM
if you REMOVE the index.php file and your sever is not properly configured, it MAY give a directory listing.

just change your index.php to something like
<?php echo 'Moving server!'; ?>

Leon


How to configure the server setting not to list directory files. It happened with me , when i tried this


I will change index.pgp with some banner but what bout the other files which customer can type on the address bar



I don't have access to apache server configuration

Inigoesdr
04-08-2008, 04:58 PM
I don't have access to apache server configuration
You can't use .htaccess files?

o0O0o.o0O0o
04-09-2008, 02:02 AM
yes i have access to that file but one thing is that i need to have access to admin directory to download the database

Inigoesdr
04-09-2008, 03:18 AM
Add it to the rewrite rule ignore section regex given earlier.

oesxyl
04-09-2008, 09:42 AM
hi

I have to transfer a website to new server.

On the weekend i will stop the website , download the database
and then upload the datase to new server

and then change the name servers

How can i amke website inaccessible for that period of time.
If i chnage the index.php file , other files will be their

Do i have to move the home directory

Any other alternative way

just put a page index.html where you say that you are moving. Is no need to make something else.

regards

Inigoesdr
04-09-2008, 04:57 PM
just put a page index.html where you say that you are moving. Is no need to make something else.

regards
The OP is worried about direct links:
I will change index.pgp with some banner but what bout the other files which customer can type on the address bar

o0O0o.o0O0o
04-10-2008, 01:40 AM
Add it to the rewrite rule ignore section regex given earlier.


sorry man , i didn't understand what u means , what is regex
I have very little knowledge bout mod_rewrite


RewriteEngine On
RewriteRule !(^moving\.php$) http://www.domain.com/moving.php [R=301]

I want to direct everyone on new index.html page which will have banner saying under construction . If my site is www.blabla.com

and i still want to access www.blabla.com/admin

how should i write .htaccess file
something like below :D


RewriteEngine On
RewriteRule !(^index\.htm$) http://www.blabla.com/index.html [R=301]
ignore : /admin