| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Student - Designer
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 31
|
htaccess allow/block question
I am building a website which is almost finished, so most of my files are online already. While my index page has no links to go further (it's an 'under construction' page) google is still indexing everything. This enables people to get into my site prior to its launch. I want an htaccess that allows me, w3.org, and google bots to access the site, but everyone else to be bumped back to my construction page. I found this code: Code:
but I am such a beginner at htaccess, I'm not sure how to really tweak it for my needs so I couldn't get it to work. (I do understand at least that the 1.1.1.1 needs to by my IP) So any help for someone who would like to learn would be great. Thanks in advance! Ben |
|
|
|
|
|
#3 (permalink) |
|
Student - Designer
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 31
|
Again, I'm a complete noob in this area. The htaccess is just what I found in reading through forums. Would you mind expanding on, or pointing me to a source that could help me? Thanks urbanbindi |
|
|
|
#4 (permalink) |
|
Copy & Paste
Join Date: Jan 2009
Location: West London
Posts: 181
|
Just out curiosity why would you want search engines to index the site if it's under construction? Surely thats bad because once the site goes live the old site files would have been cached in the search engines.. The robots example blocks search engines from indexing your site if its under construction or you can use it to block search engines from reading certain folders and directories in your website... check this link out: » 6 ways to stop Google and other search engines from indexing your site |
|
|
|
#5 (permalink) |
|
Slave on a cotton field
Join Date: Jul 2008
Location: Cuckoo's nest
Posts: 189
|
You should move the hash file (.htpasswd) into a folder that is not accesible from the outside ( /home/.htpasswd), but this is only for restricting access to a folder. For other types of rules, you need only .htaccess |
|
|
|
#6 (permalink) |
|
Student - Designer
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 31
|
Thanks so much for the link! I'll try it out. As far as not stopping google, I can't really back up that desire. I've been trying to learn SEO from a guy and now it's got me all tip-toeing around google. Thanks again for the direction! |
|
|
|
#7 (permalink) |
|
Student - Designer
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 31
|
I tried a htpasswd and htaccess file to password protect cause this is supposed to stop people and google. But now it won't even let me in with my password. I read about it here: Ilisys Web Hosting - How do I password protect a directory on a Linux server? my htaccess is now this: Code:
and my htpasswd is: Code:
They are both in my root folder (since until my launch I want to go ahead and block everything). Any clue as to why it won't let me in? |
|
|
|
#8 (permalink) |
|
Semantics, yay.
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,534
|
I'm not sure I'd share your username and password here on a forum... But, in a more helpful light, I wrote an article that may help. It's not your exact environment, but you'll be able to glean good instructions from it: Password-protect a Subdomain with Plesk at MarcAmos.com |
|
|
|
#9 (permalink) |
|
Student - Designer
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 31
|
I am not really worried about security. There are no secrets up or anything, I merely don't want people stumbling on the project before it is launched (and I read that protecting it stops bots too). If it's that important to see it, they can. And thanks for the link. |
|
|
|
#10 (permalink) |
|
Student - Designer
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 31
|
So I've tried your instructions, and the ones from htaccesstools.com but I'm still not allowed in. I know that my absolute path is right, I got that from GoDaddy. Could there be an issue with my trying to protect my root folder? |
|
|
|
#11 (permalink) | |
|
Semantics, yay.
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,534
|
Quote:
As for there being an issue trying to protect root, there shouldn't be any limitations to that. |
|
|
|
|
#13 (permalink) | |
|
Semantics, yay.
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,534
|
Quote:
For windows: Install PHP 5 Apache MySQL on Windows : WampServer For mac: living-e AG: MAMP - Mac - Apache - MySQL - PHP |
|
|
|
|
#14 (permalink) |
|
Student - Designer
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 31
|
Wow. I mean this is awesome! I am grabbing MAMO Pro from living-e as I type this. I don't know how I haven't been using this! It's exactly what I've been needing! Haha sorry about the gush, but this is totally awesome! It's like just finding out that there's such a thing as a refrigerator! |
|
|
|
#15 (permalink) | |
|
Semantics, yay.
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,534
|
Quote:
|
|
|
|
|
#17 (permalink) | |
|
Semantics, yay.
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,534
|
Quote:
|
|
|
![]() |
|