Originally Posted by
mc12345678
So your domain points to something like:
/home/username/public_html
Most cPanels have the ability to modify to where the domain points, which would mean that you could modify the domain to point to: /home/username/public_html/shop
The user would see your domain name, but the subfolder of shop would be where the content was/is. Therefore, the site could be in a folder, but the user would not see that folder. This is similar to what you should have had to do for the subdomain that you setup where you identified that the subdomain could be located in a particular folder. If that folder was specifically your public_html and not a subfolder off of it, then yes there is a mess. :)
Ok, I went to my CPANEL and there is a "script" or "button" that I press and fill in the blanks for where I want my subdomain and blog to point. So I actually don't see what goes on behind the scenes. But I asked them (hosts) and they said I could do it by putting the following in my htaccess file.
The code is:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain-name.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain-name.com$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule (.*) /folder/$1 [L]
I will assume that I would put it at the top before all other rewrites but will it interfer with my Ceon URI Mapping rewrite rules as they stand? My current code besides the CEON URI Mapping is:
Code:
#used cpanel to add the following 301 redirects
###############################################################################
RewriteCond %{HTTP_HOST} ^thestitchsanctuary\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.thestitchsanctuary\.com$
RewriteRule ^/?$ "https\:\/\/thestitchsanctuary\.com\/shop" [R=301,L]
RewriteCond %{HTTP_HOST} ^stitchsanctuary\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.stitchsanctuary\.com$
RewriteRule ^/?$ "https\:\/\/thestitchsanctuary\.com\/shop" [R=301,L]
RewriteCond %{HTTP_HOST} ^thequiltsanctuary\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.thequiltsanctuary\.com$
RewriteRule ^/?$ "https\:\/\/thestitchsanctuary\.com\/shop" [R=301,L]
I would be removing all of that. The first because it will no longer be needed and the next two because I read that those just cause google to split the rankings between them therefore hurting my rankings.
This is my CEON code:
Code:
# ONLY rewrite URIs beginning with /shop/
RewriteCond %{REQUEST_URI} ^/shop/ [NC]
# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
# which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
# which are not covered by main file extension condition above
# Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/shop/myadmin [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/shop/editors/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/shop/logs/ [NC]
# Don't rewrite sitemap directory
RewriteCond %{REQUEST_URI} !^/shop/sitemap/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/shop/cgi\-bin/ [NC]
# Don't rewrite bmz_cache directory
RewriteCond %{REQUEST_URI} !^/shop/bmz_cache/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* shop/index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE
I don't think I would want the /shop/ rewrites but not sure how to format the one that just says /shop/ . Would it be just "/" (no quotes, first rewrite cond). Or can I just rre-run the ceon configuration script again.
Popular good versus bad? Well, everyone has their preference and reason and method of managing. I've worked significantly from two different hosts, neither specifically has a public_html folder, but they have "defaults" for all that they do. Is it good to follow a "social" norm? Sure, that way everyone can talk from the same page... It is also why certain things are used/stated for certain conditions and expectations on this forum. That way everyone can relate and work from a common basis. :)
Thanks. (Please tell me I didn't expose anything)
Bookmarks