| Leo2London |
|
NetHosted Customer
Joined: 21 Dec 2009 Posts: 28 Location: UK
|
Posted: Wed Jan 20, 2010 10:06 pm Post subject: An .htaccess file question |
| |
If I already have the following code in my .htacess file and I upload it, what will it show?
RewriteEngine on
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName wom-hat.com
AuthUserFile /home/nope/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/nope/public_html/_vti_pvt/service.grp
RewriteCond %{HTTP_HOST} ^wom-hat.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.wom-hat.com$
RewriteRule ^admin\/?$ "http\:\/\/www\.wom\-hat\.com\/" [R=302,L] |
|
| Back to top |
|
| NetHosted - Andrew |
|
NetHosted Staff

Joined: 22 Mar 2004 Posts: 7017
|
Posted: Wed Jan 20, 2010 10:18 pm Post subject: |
| |
Hi,
What do you mean by "what will it show"?
Thanks,
Andrew _________________ | Andrew Bassett
| Managing Director, NetHosted Ltd.
| Follow us on Twitter: http://twitter.com/nethosted
| Members, tell us what you think of NetHosted! |
|
| Back to top |
|
| Leo2London |
|
NetHosted Customer
Joined: 21 Dec 2009 Posts: 28 Location: UK
|
Posted: Wed Jan 20, 2010 10:21 pm Post subject: |
| |
| That code is in the htaccess file so if I upload that now will it show a blank page or...? thanks. |
|
| Back to top |
|
| NetHosted - Andrew |
|
NetHosted Staff

Joined: 22 Mar 2004 Posts: 7017
|
Posted: Wed Jan 20, 2010 10:43 pm Post subject: |
| |
Hi,
People won't be able to access the .htaccess via their browsers.
Thanks,
Andrew _________________ | Andrew Bassett
| Managing Director, NetHosted Ltd.
| Follow us on Twitter: http://twitter.com/nethosted
| Members, tell us what you think of NetHosted! |
|
| Back to top |
|
| Leo2London |
|
NetHosted Customer
Joined: 21 Dec 2009 Posts: 28 Location: UK
|
Posted: Thu Jan 21, 2010 4:10 pm Post subject: |
| |
| Thanks. Lastly (hopefully) after editing the htaccess where do I change the file permissions for the file, via the FTP or cpanel? |
|
| Back to top |
|
| NetHosted - Darryl |
|
NetHosted Staff

Joined: 24 Jun 2005 Posts: 1013
|
Posted: Thu Jan 21, 2010 4:12 pm Post subject: |
| |
Hi,
I don't believe you'd need to change permissions for the .htaccess file, if you do for some reason though then FTP or cPanel are equally effective.
Regards,
Darryl _________________ | Darryl Taylor
| Technical Support & Sales Manager, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think of NetHosted! |
|
| Back to top |
|
| Leo2London |
|
NetHosted Customer
Joined: 21 Dec 2009 Posts: 28 Location: UK
|
Posted: Thu Jan 21, 2010 4:31 pm Post subject: |
| |
I just did a tester I banned my IP but I can still access my site??? I should not be able to after blocking my own IP. _________________ This Is The Day
Last edited by Leo2London on Thu Jan 21, 2010 4:33 pm; edited 1 time in total |
|
| Back to top |
|
| NetHosted - Darryl |
|
NetHosted Staff

Joined: 24 Jun 2005 Posts: 1013
|
Posted: Thu Jan 21, 2010 4:33 pm Post subject: |
| |
Hi,
What code did you use?
Regards,
Darryl _________________ | Darryl Taylor
| Technical Support & Sales Manager, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think of NetHosted! |
|
| Back to top |
|
| Leo2London |
|
NetHosted Customer
Joined: 21 Dec 2009 Posts: 28 Location: UK
|
Posted: Thu Jan 21, 2010 4:37 pm Post subject: |
| |
All of the below;
RewriteEngine on
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName web-site.com
AuthUserFile /home/place/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/place/public_html/_vti_pvt/service.grp
RewriteCond %{HTTP_HOST} ^web-site.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.web-site.com$
RewriteRule ^admin\/?$ "http\:\/\/www\.web\-site\.com\/" [R=302,L]
order deny,allow
deny from 12.3.456.789
allow from all _________________ This Is The Day |
|
| Back to top |
|
| NetHosted - Darryl |
|
NetHosted Staff

Joined: 24 Jun 2005 Posts: 1013
|
Posted: Thu Jan 21, 2010 4:42 pm Post subject: |
| |
Hi,
It should be:
| Code: | order allow,deny
deny from <ip>
allow from all |
Regards,
Darryl _________________ | Darryl Taylor
| Technical Support & Sales Manager, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think of NetHosted! |
|
| Back to top |
|
| Leo2London |
|
NetHosted Customer
Joined: 21 Dec 2009 Posts: 28 Location: UK
|
Posted: Thu Jan 21, 2010 4:58 pm Post subject: |
| |
Thanks, it now works as it should.  _________________ This Is The Day |
|
| Back to top |
|
| NetHosted - Darryl |
|
NetHosted Staff

Joined: 24 Jun 2005 Posts: 1013
|
Posted: Thu Jan 21, 2010 5:01 pm Post subject: |
| |
You're welcome!
Regards,
Darryl _________________ | Darryl Taylor
| Technical Support & Sales Manager, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think of NetHosted! |
|
| Back to top |
|
| Leo2London |
|
NetHosted Customer
Joined: 21 Dec 2009 Posts: 28 Location: UK
|
Posted: Thu Apr 15, 2010 2:08 pm Post subject: |
| |
Do I need all this coding anyway?
"RewriteEngine on
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*" _________________ This Is The Day |
|
| Back to top |
|
| NetHosted - Darryl |
|
NetHosted Staff

Joined: 24 Jun 2005 Posts: 1013
|
Posted: Thu Apr 15, 2010 2:09 pm Post subject: |
| |
Hi,
You need "RewriteEngine on" but you don't need the other 2 lines if you are not using FrontPage to upload your website.
Regards,
Darryl _________________ | Darryl Taylor
| Technical Support & Sales Manager, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think of NetHosted! |
|
| Back to top |
|
User Permissions |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
| |