是的,你可以通過使用.htaccess過濾訪問。
RewriteEngine On
RewriteBase/
# Your IP Address
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.1$
# More IPs
#RewriteCond %{REMOTE_ADDR} !^255\.255\.255\.255$
RewriteCond %{REQUEST_URI} !^/soon.html$
# If you need to also give access to some specific folder (for example images)
# you can use the following instruction
#RewriteCond %{REQUEST_URI} !^/images/.*$
# This line says: redirect to soon.html.
# This is a redirect (sent back to the browser), so the full URL is required.
# We're using 302 because sooner or later you'll open the website for everyone.
RewriteRule ^(.*)$ http://www.example.com/soon.html [R=302,L]
只是把這個在你的.htaccess(所有其他指令之前,你可能在那裏),每個人都認爲不具有IP將被重定向到soon.html。
這樣你就可以繼續開發與最終網站所在的路徑相同的路徑。
備註: 這將過濾所有其他IP,包括來自第三方實體的pingbacks。如果您使用PayPal IPN或需要與您的網站通信的任何其他網關,則必須手動將該IP添加到.htaccess中(如代碼本身所述)。
希望這會幫助你。
http://codex.wordpress.org/Moving_WordPress應該回答你的大部分問題 –
哇,謝謝!很棒的鏈接! – Marshal