haagendazs Posted July 25, 2008 Posted July 25, 2008 Hi everyone, I've searched in the forum and on google, and couldn't find the answer to this! I apologize if this is a common question! I'd like to ask: 1) Do I have to keep the folder's name "catalog"? Or can I physically have the folder be something like mystore.com/store? 2) I've heard somewhere about security measures in renaming the "admin" folder. So can I change it to something like mystore.com/store/login, rather than mystore.com/catalog/admin? I guess a corollary to this would be, is this really necessary? 3) This is my most important question, and I really would appreciate help on this one! I'd like to physically install osCommerce in a subdirectory separate from my top-level root, so for example, mystore.com/catalog. However, I want visitors to only see mystore.com/ without the "catalog". I'm aware people install osCommerce in their root because of this, but I'd rather not have all the separated loose files floating around in my root directory. I've also looked around, and noticed that mod_rewrite seems to be able to help here. So I guess I'm asking, what do I need to write using mod_rewrite (in .htaccess, if I'm not mistaken - I'm a newbie at this), to virtually turn "mystore.com/catalog" to "mystore.com/"? Thanks a lot everyone, and I'm looking forward to spending a lot of time with osCommerce! :)
GemRock Posted July 26, 2008 Posted July 26, 2008 1. yes you can and that can be any word you like but not a good option; 2. yes you can change to something else preferably something hard to guess such as some random letters, if you want to change it to login then i rather keep admin; 3. not worth it. most people install it on web root and they cant all be wrong in fact they are all right. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
haagendazs Posted July 26, 2008 Author Posted July 26, 2008 Ken, Thanks for the quick reply! 1) Why is this not a good option? 2) Thanks 3) Is it not worth it because it's really difficult or tedious to do? I currently have other websites also installed in subdirectories, and say I really really just want to keep it that way - could you please tell me how to do the mod_rewrite stuff to do it, despite if its not worth it? Also, if I end up doing 2 different eCommerce sites, both with the same hosting, but different domain names, wouldn't that be a problem if I have a single osCommerce install already in the root? :)
GemRock Posted July 26, 2008 Posted July 26, 2008 reason for q1 is similar to q3, and NO, you cant host two physical websites each of which has its own domain name under one web space, either at webroot or subdirectory. by physical website it is meant not a redirect from one to the other. if this is what you are thinking of achieving by having your shop installed at a folder, then you should forget about it now. it is simply impossible. a domain name is unique on the www/internet, and as such, must have its own web space. mod rewrite is used for rewriting urls, not for redirection. what you are talking about is something like a 301 redirect but if your shop is the most important why on earth you want to put it under a folder, what you use the web root for? Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
spooks Posted July 26, 2008 Posted July 26, 2008 You can have multiple domains pointing to the same web-space & serve different content. [font="Courier New"]#two domains served from one root.. RewriteCond %{HTTP_HOST} domain-one.com RewriteCond %{REQUEST_URI} !^/one RewriteRule ^(.*)$ one/$1 [L] RewriteCond %{HTTP_HOST} domain-two.com RewriteCond %{REQUEST_URI} !^two RewriteRule ^(.*)$ two/$1 [L][/font] Not my code for more detail see: http://corz.org/serv/tricks/htaccess2.php Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
GemRock Posted July 26, 2008 Posted July 26, 2008 You can have multiple domains pointing to the same web-space & serve different content... well you can in theory but i guess you cant in practice when we are talking about two osc shops not just a few web pages and on what domain are you going to host this .htaccess? and there will also be nameservers/ips setup issues which you maynot be able to bypass your host. can I mod-rewrite google.com or whichever i like to one of my folders? as the domain-one, domain-two looks like could be anything. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
haagendazs Posted July 26, 2008 Author Posted July 26, 2008 Thanks for the replies guys! I'm not really sure what you mean by it's impossible to have two physical websites with different domains to be under one web space. Right now I have a 1&1 Business hosting package, with 5 different domains, and all their files are in the same 1&1 host, just under different directories. Maybe I am going for a "301 redirect", I'm not sure as I'm new to this. However, let's say besides the point that the shop "should" be the most important thing in the world to me, and I just want to do it just because. I'll take a look at the link you have, spooks, thanks! It looks like it might? be what I need.
haagendazs Posted July 26, 2008 Author Posted July 26, 2008 Oh, I found this link as well, which seems to be exactly what I want. I'll test it later and hope it works. But for anyone else having the same issue: http://www.mydigitallife.info/2007/10/06/s...-parent-folder/
haagendazs Posted July 26, 2008 Author Posted July 26, 2008 Hmm, just tried the last link's suggestion out but it wasn't working, maybe I'm doing something wrong. What I'm really trying to achieve is, (for anyone who is familiar with Wordpress), the way Wordpress has the option of "Wordpress Address" and "Blog Address" as two different URLs.
GemRock Posted July 26, 2008 Posted July 26, 2008 suppose i have two osc shops domain1.com and domain2.com, and hosting each would cost £100s/month, so it is ecconomical to try all the tricks on the book to host the two under one web space to save money. now, here is my headache, which seems incurable: both shops need dedicated SSL, which in turn requires dedicated IP for each and each SSL will need to be associated with either domain1.com or domain2.com but cant be both. i guess apache would need to be re-created to allow me to do this. a subdomain may be what you need if your host allows you to set up subdomains. i guess your 1&1 folders are in fact different webroots/spaces. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
haagendazs Posted July 26, 2008 Author Posted July 26, 2008 Is having a dedicated SSL a requirement? I'm not really sure what that is, so could you please elaborate a little? Thanks!
GemRock Posted July 26, 2008 Posted July 26, 2008 Is having a dedicated SSL a requirement? I'm not really sure what that is, so could you please elaborate a little? Thanks! it all depends on how you and in particular your customers see it. it is a requirement for a serious online shop. what i said in my post was a scenario that if you are running a serious online shop then.... even you choose a shared SSL (if your host provide you one) you would still got that 'incurable headache'. Ken ps sorry we only discuss oscommerce related issues here. for worpress or any other application you would need to go to their forums to look for answers. commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.