To exclude a folder from the wordpress rewrite in .htaccess, add the following line before the other RewriteConds, replacing somedir with your folder name:
RewriteCond %{REQUEST_URI} !^/(somedir|somedir/.*)$
A Log of Coding Solutions
by Webhead
To exclude a folder from the wordpress rewrite in .htaccess, add the following line before the other RewriteConds, replacing somedir with your folder name:
RewriteCond %{REQUEST_URI} !^/(somedir|somedir/.*)$
by Webhead
I recently had to move a server and needed to set up another server. I’m a linux newbie so I needed to look up a lot of things. Below are some of the more common commands that I needed: (replace with your own command/name).
alias =''
ln -s
http://kb.iu.edu/data/abbe.html
scp :
scp : :
chown -R :
chmod -R 644
find / -name
http://content.hccfl.edu/pollock/unix/findcmd.htm
sudo useradd -d /home/ -m
sudo passwd
usermod -g
groupadd
usermod -G
sudo chmod g+s
find wp-content -type f -exec du -h {} + | sort -rh | head -n 10
by Webhead
Locations and commands on the Mac OS X vs any other Linux/Unix system are different. Below are some of the locations and commands I ran across in setting up my macbook as a webserver.
/etc/apache2/
/etc/apache2/httpd.conf
/var/log/apache2
/Library/WebServer/Documents/
sudo /usr/sbin/apachectl restart
or
sudo apachectl -k restart
#LoadModule php5_module libexec/apache2/libphp5.so
by Webhead
The following commands should be run daily. This will give you a backup for 1 full month. After 1 month the backups will overwrite the oldest files. The %d is the day of the month.
In your Hosting Dashboard -> Content -> Chron Manager, enter the following line as the command. Replace <xxx> with the appropriate values.
mysqldump --opt -Q -h <server_address> --user=<username> --password=<password> <database_name> > <your_path>/<database_name>_`date +%d`.sql
In the CPanel -> Cron Jobs, enter the following line as the command. replace <xxx> with the appropriate values.
mysqldump --opt -Q -h localhost --user=<username> --password=<password> <database_name> > /<your_path>/<database_name>_`date +%d`.sql
by Webhead
GoDaddy makes it simple to password protect a directory. You just go to their file manager, click on a directory, click on Permissions, fill out a user and password and you’re done. Bad thing is that you can’t password protect anything in the public root folder.
Easiest solution is to password protect a subdirectory, open .htaccess, copy the code there and paste it into your .htaccess in the root public folder and then wait a few hours. Seriously, just wait. I followed these steps and didn’t wait, got worried it wasn’t working and undid everything. a few hours later I ran into this post: http://www.besthostratings.com/articles/http-auth-php-cgi.html
With that post I felt that I could hackily get the authenticated username and password and then use PHP to determine whether the username/password is correct or not. Then I could show or not show what I needed. After all, this was only temporary until the client’s site went live. I soon found out however that the first solution worked this time. Go figure.
by Webhead