Jump to content

[Answered] Allow single ip using .htaccess unsuccessful.


clstrfck

Recommended Posts

Not having much success at using an .htaccess file to allow only my ip address.

Tried this solution from Byron posted at the bottom of the page.

https://www.helionet.org/index/topic/38198-how-to-protect-folder-and-its-child-files/?hl=.htaccess&do=findComment&comment=169431

Forbidden.

 

Also tried the apache 2.4 syntax"

Require up xxx.xxx.xxx.xxx

Forbidden once again.

 

Are .htaccess rules disabled on the apache server "Johnny"?

 

Thank you for your time.

Edited by clstrfck
Link to comment
Share on other sites

That deny,allow stuff, apart from being incredibly confusing, has also been deprecated for years, and was removed entirely in the latest version of Apache. I'm actually surprised it was still working as little as 10 months ago. This is what I use in .htaccess

RewriteEngine On
RewriteCond %{REMOTE_ADDR} !65.19.143.5
RewriteCond %{REQUEST_URI} !construction.html$
RewriteRule ^(.*)$ https://clstrfck.heliohost.org/construction.html [R=302,L]
Link to comment
Share on other sites

.htaccess works with the Require ip xxx.xxx.xxx.xxx but not in the subdomain that the helioshost.org system provides.

One line in the standalone TLD that went live a little while ago, works perfectly.

 

My technical expertise in web hosting is minimal so it's not clear to me why this occurs.

 

Thanks Krydos for the assistance.

Maybe this will help another member.

 

Please mark this as solved.

Edited by clstrfck
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...