close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

restrict access to everything except specified page(s) using .htaccess

Thread began 5/08/2013 11:48 am by CraigR | Last modified 5/08/2013 2:50 pm by Jason Byrnes | 943 views | 3 replies |

CraigRBeta Tester

restrict access to everything except specified page(s) using .htaccess

I tend to upload 'work in progress' to subdomains of my site and use an htaccess file in the folder root to restrict access.

My client has a 'holding page' and wants me to transfer the site files to his server so he can work on the cms content, and then all i need to do is remove the htaccess restriction at go live.

my htaccess file to restrict all access is pretty simple,

# password-protect the directory in which this htaccess rule resides
AuthType basic
AuthName "This directory is protected"
AuthUserFile /path/to/password/file/
AuthGroupFile /dev/null
Require valid-user

How can i restrict access to everything except, say, index.html, so visitors can still access the landing page only ?

I googled a few 'solutions' to this, but none have worked.

As I can restrict access generally, I know the server is set up ok and the password file is in the right place,

Sign in to reply to this post

Jason ByrnesWebAssist

instead of trying to restrict access to the site files, you should restrict access by IP address.

allow your client IP address to access the site, but show an under construction message to others.
http://www.inmotionhosting.com/support/website/how-to/redirect-visitors-under-construction-page

Sign in to reply to this post

CraigRBeta Tester

Is this solution compromised if the ip address is not fixed, which is often the case?

Sign in to reply to this post

Jason ByrnesWebAssist

the htaccess file would need to be updated when the ip changes, but is much more complex to restrict access to only some pages using htaccess.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...