Community Membership

This video is available with a RapidWeaver Community subscription. Signup and get instant access to all our videos, priority support, discounts and more.

Monthly $25 Yearly $240 Lifetime $399

Subscribing is quick and easy — you'll have access in less than two minutes. Cancel anytime, no questions asked. More information.

Basic Authentication using htaccess

Learn how to add basic authentication to pages on your site using an .htaccess and .htpasswd files.

Comments

Mark Spaulding

1 year ago

Well done! I had not realized this was available. Thanks for sharing what a great resource this site is! Blessings, —Mark


bencounsell

1 year ago

Glad you enjoyed the video, and the site in general :)

Turtle

1 year ago

Excellently done Ben! Can you provide more notes in the description (the url for the htpasswd generator) with perhaps a zip file for snippets for this video would be awesome additions! Yes, I could pause the video and perform said things but thought I would ask anyway ;)

Next, how to protect your htaccess and htpasswd files from download :)


bencounsell

1 year ago

Ah yeah, I forgot to put the link in for the htpasswd generator, here it is: http://www.htaccesstools.com/htpasswd-generator/

And I plan on getting something setup for code snippets used in videos, it'll be available soon.

And and, htaccess file protection is actually in my next video, which will hopefully be online today :)

bluehatweb

1 year ago

Excellent videos!!

Have you ever considered a mechanism to incorporate the .htaccess file within the RW project file itself, that would then allow it to be maintained directly from within RW and get published along with the standard RW files? Would seem to me to be a sensible place to try to maintain such a file

I had tried to do this myself using a standard HTML page within RW, but it wouldn't allow ".htaccess" to be used as a filename.


Turtle

1 year ago

You can use an HTML page type, in the Inspector tab, change the path to / and the filename to htaccess.txt. This will allow RapidWeaver to manage the file and upload it to the server. However, yo still require FTP access to the site to change the filename from htaccess.txt to .htaccess. The reason they don't manage it at present (I believe) is because of the way hosting companies manage the htaccess file. Some don't allow it thereby breaking your site, some relocate it to /private but your site is actually in /public_html (or other folder at the same level as private). This would be a support nightmare imho.

bencounsell

1 year ago

Allowing .htaccess and .htpasswd files to be created/managed inside RapidWeaver is something we want to add, however as Turtle points out, it's a little more tricky that you might think. If we can find a way to reliably allow creation of these files, then we'll add it to RapidWeaver :)

jamsk

8 months ago

The code you used to display the document root didn't work on my ISP server, but this did:

<?php echo getcwd() ?>

This might help others who also find the $_SERVER code doesn’t work on their site.

Video Details