Skip to content

Instantly share code, notes, and snippets.

View dmgallardo's full-sized avatar
🏠
Working from home

Diego Gallardo dmgallardo

🏠
Working from home
View GitHub Profile
@dmgallardo
dmgallardo / gist:3641950
Created September 5, 2012 18:24
.htaccess How to make a subfolder the main folder for your primary domain
#From: http://support.lunarpages.com/knowledge_bases/article/549
# .htaccess primary domain to subfolder redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change yourdomain.com to be your primary domain.
@dmgallardo
dmgallardo / gist:1753941
Last active September 30, 2015 08:38
HTACCESS: Rewrite rule for shared sites under the same server, add a 2nd site under a subfolder
#Create a folder subdomain, and make it work like a domain.
RewriteCond %{HTTP_HOST} mysite.com.ar
RewriteCond %{REQUEST_URI} !^/mysite #mysite_folder
RewriteRule ^(.*)$ mysite/$1 [L] #mysite_folder