So basically what I'm trying to do is modify my .htaccess so that my main site's base folder is in a subfolder of public_html just like my addon domains.
Something like this:
Now this would be very simple if I just wanted to do a redirect, but I don't want the URL of the browser to show a subfolder.
I want to see:
MainDomain Name Registration
NOT http://www.maindomain.com/mainsubfolder
The other dilemma I have is that I don't want it to negatively affect SEO by having Google index two versions of the site (maindomain.com & maindomain.com/subfolder) or some other factors.
The reason I want to do this is for organization mainly, since I don't want to have all my website/wordpress/other script files and folders in the public_html folder directly, it makes it hard to manage things this way.
So far what I've found is the following .htaccess code:
Which should do what I want, but I'm concerned about the SEO consequences. I figure with all the brains we got here, hopefully someone can help me solve this conundrum.
Something like this:
public_html/mainsubfolder
public_html/addon1
public_html/addon2
Now this would be very simple if I just wanted to do a redirect, but I don't want the URL of the browser to show a subfolder.
I want to see:
MainDomain Name Registration
NOT http://www.maindomain.com/mainsubfolder
The other dilemma I have is that I don't want it to negatively affect SEO by having Google index two versions of the site (maindomain.com & maindomain.com/subfolder) or some other factors.
The reason I want to do this is for organization mainly, since I don't want to have all my website/wordpress/other script files and folders in the public_html folder directly, it makes it hard to manage things this way.
So far what I've found is the following .htaccess code:
# Turn on rewrites.
RewriteEngine on
# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
# Only apply to URLs that aren't already under folder.
RewriteCond %{REQUEST_URI} !^/mainsubfolder/
# Don't apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all those to insert /folder.
RewriteRule ^(.*)$ /mainsubfolder/$1
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
RewriteRule ^(/)?$ mainsubfolder/index.php [L]
Which should do what I want, but I'm concerned about the SEO consequences. I figure with all the brains we got here, hopefully someone can help me solve this conundrum.