Skip to content

Instantly share code, notes, and snippets.

@chrisco23
Created January 13, 2019 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisco23/ad59597cbc334bccaf009fbd1f005974 to your computer and use it in GitHub Desktop.
Save chrisco23/ad59597cbc334bccaf009fbd1f005974 to your computer and use it in GitHub Desktop.
.htaccess for site attempting to fix admin setup
Here is the current .htaccess. I did not create this file. I am only trying to get the admin part properly set up.
`#<IfModule mod_suphp.c>
# suPHP_ConfigPath /home/user/public_html
#</IfModule>
#SetEnv TZ 'America/Los_Angeles'
RewriteCond %{HTTP_HOST} ^staging\.admin\.example\.com$ [NC]
RewriteRule ^$ "http\:\/\/staging\.example\.com\/admin\.index\.php" [L]
RewriteCond $1 !^(images|mp3|combine|style|javascript)
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]
RewriteRule ^style/(.*\.css) /combine.php?type=css&files=$1
RewriteRule ^javascript/(.*\.js) /combine.php?type=javascript&files=$1
#SetEnvIf Host admin.staging.example.com passreq
#AuthType Basic
#AuthName "Password Required"
#AuthUserFile /home/user/public_html/.htpasswds/staging.example.com.htpasswd
#Require valid-user
#Order allow,deny
#Allow from all
#Deny from env=passreq
#Satisfy any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment