Password Protected Directories and Wordpress
by Dan | Comments Off
So I moved my Wordpress install to the root folder of my website, which was a huge pain (basically I created a new install and then imported and dragged everything over). But everything is up and working now but the only issue I had was for my Forum. Since my forum sits in a password protected directory (thanks webcrawlers trying to register!) it was causing a 404 error when I tried to go to the folder. It seems that it does’t handle a 401 authentication correctly and incorrectly throws a 404 error after the redirect. All you need to do is add one line to the .htaccess file in Wordpress’s main directory. Below is the line you need to add:
ErrorDocument 401 "Unauthorized access"
It’s that simple and that will make the directory function as desired
Set the PHP Upload File Size
by Dan | Comments Off
Using the .htaccess file you can edit the maximum size allowed for file uploading to your server. Obviously you do not want to pick something ridiculous but when your upload size is as small as say 2MB you might want to change that.
Edit you .htaccess file and add this code snippet:
php_value upload_max_filesize 50M
.htaccess 301 Redirect Code
by Dan | Comments Off
Looks like I keep forgetting to post the code for this so this is how you will do a 301 .htaccess redirect
| Redirect 301 /index.html http://www.danieltmurphy.com/welcome-to-my-site/ |
You must redirect from a specific location to a specific location. In this case my index.html file is totally blank but it does exist
.htaccess File Generator
by Dan | Comments Off
Webpage to help you setup .htaccess security and rights