This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# www.example.com to example.com | |
RewriteCond %{HTTP_HOST} ^www\.example\.com$ | |
RewriteRule ^/?$ "http\:\/\/example\.com\/" [R=301,L] | |
# example.com to www.example.com | |
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC] | |
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#about: checking services, if down ? restart | |
#note: dont forget to add this script to cron for automation | |
#define services to check | |
services=( "httpd" "mysqld" ) | |
for service in "${services[@]}" | |
do |