Welcome to the world wide web!
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteEngine On RewriteCond %{HTTP_HOST} !^www.domain.com RewriteRule (.*) http://www.domain.com$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1 [R=301,L]
You can use Perl regular expression syntax with RewriteCond
RewriteEngine On RewriteCond %{REQUEST_URI} ^/(dmc)?wiki RewriteRule ^(.*)$ https://wiki.digitaltrike.com/$1
Order Deny,Allow Deny from all Allow from 192.168.1.0/24
CentOS:
apachectl -t -D DUMP_MODULES
SetEnvIf Remote_Addr 192\.168\.12\. local <IfModule mod_headers.c> Header set Pragma "" env=local Header set Cache-Control "" env=local Header set Expires "Sat, 01 Jan 2000 00:00:00 GMT" env=local </IfModule>
If PHP is installed as a CGI binary, this will not work. But it is safe to set because of IfModule
.
<IfModule mod_php5.c> php_value include_path ".:/usr/local/lib/php" </IfModule>