Guest Posted August 4, 2005 Share Posted August 4, 2005 I have noticed a problem with my aliased domains, for some reason when I click on any link on the aliased domain it will take me to the page on the main domain. ie, Say I'm on domain2.co.uk and click a link to product1, instead going to domain2.co.uk/catalog/product1.html it goes to domain1.co.uk/catalog/product1.html Is there a reason that OsCom is specifying the domain url before the folders? as there isn't any reason it should need to. I'm also using Chemo's Ultimate URL's so if this isn't standard behaviour for oscommerce then it might be a problem with the rewrite in that contribution. Heres my htaccess file just in case:- # $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $ RewriteEngine on RewriteBase /catalog/ RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} # Set some options #Options -Indexes #Options FollowSymLinks# # Skip the next two rewriterules if NOT a spider #RewriteCond %{HTTP_USER_AGENT} !(msnbot|slurp|googlebot|yahoobot|inktomi) [NC] #RewriteRule .* - [S=2] # # case: leading and trailing parameters #RewriteCond %{QUERY_STRING} ^(.+)&osCsid=[0-9a-z]+&(.+)$ [NC] #RewriteRule (.*) $1?%1&%2 [R=301,L] # # case: leading-only, trailing-only or no additional parameters #RewriteCond %{QUERY_STRING} ^(.+)&osCsid=[0-9a-z]+$|^osCsid=[0-9a-z]+&?(.*)$ [NC] #RewriteRule (.*) $1?%1 [R=301,L] # # This is used with Apache WebServers # # For this to work, you must include the parameter 'Options' to # the AllowOverride configuration # # Example: # # <Directory "/usr/local/apache/htdocs"> # AllowOverride Options # </Directory> # # 'All' with also work. (This configuration is in the # apache/conf/httpd.conf file) # The following makes adjustments to the SSL protocol for Internet # Explorer browsers #<IfModule mod_setenvif.c> #<IfDefine SSL> # SetEnvIf User-Agent ".*MSIE.*" \ # nokeepalive ssl-unclean-shutdown \ # downgrade-1.0 force-response-1.0 #</IfDefine> #</IfModule> # Fix certain PHP values # (commented out by default to prevent errors occuring on certain # servers) #<IfModule mod_php4.c> # php_value session.use_trans_sid 0 # php_value register_globals 1 #</IfModule> Any help would be much appreciated. Thanks :) Link to comment Share on other sites More sharing options...
♥Vger Posted August 4, 2005 Share Posted August 4, 2005 When you land on your website, from wherever you come, you are landing there because you have specified the url to go to in your browser. But once you're on the site and click onto your first other page you are controlled by the settings in the configure.php files on the website - and they will always reference the domain it's installed on. Domain aliasing is only useful as a means of owning the same domain with various tld's and directing all to the one functional website. Vger Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 Domain aliasing is only useful as a means of owning the same domain with various tld's and directing all to the one functional website. Vger <{POST_SNAPBACK}> Not so. Before using OsCommerce I had a static site on a .com with an aliased .co.uk All links on the site were /folder/page.html and not http://www.domain/folder/page.html as there is no need for the http://www.domain part on an internal link. You were then able to navigate my aliased site without being sent to the main site pages. This allowed me to rank highly in the uk only searches and also in the generic searches. Since moving to Oscommerce My uk searches are nowhere to be found although in a generic search I still have top rankings. My Uk sales have dropped to a small trickle. There must be a way to alter the config or a piece of code in oscommerce to no put the full url in front of internal links. As I said any help with this would be much appreciated. Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 this is all based upon how the server is setup. if i am understanding you correctly, it sounds like in your browser it just showed the aliased domain with /folder/page.html (and the difference may be .html) Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 this is all based upon how the server is setup.if i am understanding you correctly, it sounds like in your browser it just showed the aliased domain with /folder/page.html (and the difference may be .html) <{POST_SNAPBACK}> What I'm saying is that Oscommerce is writing full url links to a page in the code rather than just putting in the link to the page without specifying the domain. i.e http://www.ideal-handling.co.uk/catalog/ma...ipment-c-1.html instead of /catalog/material-handling-equipment-c-1.html There is no need to have the full url including the domain when it's an internal link. Due to this my aliased pages all link to the main site pages and don't stay internal. Link to comment Share on other sites More sharing options...
♥Vger Posted August 4, 2005 Share Posted August 4, 2005 You obviously missed this bit (below). You can try leaving out the domain in your includes/configure.php file, but I doubt it would work - because then you'd have the problem of sessions and one database on one site handling data from an alias. But once you're on the site and click onto your first other page you are controlled by the settings in the configure.php files on the website - and they will always reference the domain it's installed on. Vger Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 You obviously missed this bit (below). You can try leaving out the domain in your includes/configure.php file, but I doubt it would work - because then you'd have the problem of sessions and one database on one site handling data from an alias.Vger <{POST_SNAPBACK}> Isn't there some php code that you could add to the configure that would check the referring domain and set the configure domain to that domain? so you would have check http domain referer if referrer is 'blah1' if referrer is 'blah2' if referrer is 'blah3' if referrer is 'blah4' then http server is 'domain' define http server as 'domain' or some such, Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 If i change the line in my configure from define('HTTP_SERVER', 'http://www.ideal-handling.com'); // eg, http://localhost - should not be empty for productive servers to define('HTTP_SERVER', ''); // eg, http://localhost - should not be empty for productive servers It works and I can add items to my cart. I'm not worried that one database will be used for both the main site and the alias site. also both sites use the same ip. What else could be problematic using this method??? I would rather there was some kind of define in there though.. Link to comment Share on other sites More sharing options...
♥Vger Posted August 4, 2005 Share Posted August 4, 2005 No doubt you could do that, if it related to different websites with different files and different configure.php files. But an alias is just an alias, it only exists on your server as an alias of the main domain and has no physical existence of its own. You may be able to do something to mask the url's via .htaccess permanent redirect from the domain that's aliased to your main domain - but that would require that the alias domain has at least a minimal web presence of its own so that you can insert a .htaccess file. Vger Link to comment Share on other sites More sharing options...
♥Vger Posted August 4, 2005 Share Posted August 4, 2005 It works and I can add items to my cart. If it works then fine, but I honestly can't see it working right throughout the website and for all parts of transactions, accounts, sessions etc. Vger Link to comment Share on other sites More sharing options...
AlanR Posted August 4, 2005 Share Posted August 4, 2005 It works and I can add items to my cart. I'm not worried that one database will be used for both the main site and the alias site. also both sites use the same ip. What else could be problematic using this method??? I would rather there was some kind of define in there though.. <{POST_SNAPBACK}> It seemed like it should work. You'll need to test throughout to see what other problems might come up with sessions and cookies. As to the define, you could change: define('HTTP_SERVER', ''); to: define('HTTP_SERVER', '/'); then make the catalog paths 'catalog/' It's kind of a trivial difference but it seems more tidy. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 It seemed like it should work. You'll need to test throughout to see what other problems might come up with sessions and cookies. As to the define, you could change: define('HTTP_SERVER', ''); to: define('HTTP_SERVER', '/'); then make the catalog paths 'catalog/' It's kind of a trivial difference but it seems more tidy. <{POST_SNAPBACK}> Good Point :) Will change it to that. Also a little side note and something else trivial but you joined this site on my birthday :thumbsup: lol Link to comment Share on other sites More sharing options...
AlanR Posted August 4, 2005 Share Posted August 4, 2005 You'll still have to set the https domain completely or you'll lose ssl. That might be OK because for visitors and search engines you'll appear as whatever they come in on but for checkout they're taken to a "central" site. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 You'll still have to set the https domain completely or you'll lose ssl. That might be OK because for visitors and search engines you'll appear as whatever they come in on but for checkout they're taken to a "central" site. <{POST_SNAPBACK}> I use protx payment gateway for my credit card payments, so I don't use ssl on my site. Link to comment Share on other sites More sharing options...
AlanR Posted August 4, 2005 Share Posted August 4, 2005 I use protx payment gateway for my credit card payments, so I don't use ssl on my site. <{POST_SNAPBACK}> Shhh... You'll have the privacy nazis here screaming about the sanctity of customer privacy. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 Ok, I've changed it a little now. instead of leaving it blank I have used the following define('HTTP_SERVER', 'http://'.$HTTP_HOST); // eg, http://localhost - should not be empty for productive servers Everything seems sweet. Only thing I've noticed is that normaly the osCsid dosn't show up in the address bar, now when I view a few products on the aliased domain i get ?osCsid=b7529fbc58febf22133b943899752be6 after my .html :( Anyone??? Link to comment Share on other sites More sharing options...
AlanR Posted August 4, 2005 Share Posted August 4, 2005 Only thing I've noticed is that normaly the osCsid dosn't show up in the address bar, now when I view a few products on the aliased domain i get ?osCsid=b7529fbc58febf22133b943899752be6 after my .html :( Anyone??? <{POST_SNAPBACK}> Yep, that's what I kinda expected. I visited and didn't see the osCID after a few clicks then left. Then I checked to see if the site had set a cookie and I couldn't find one. How do you have the cookie domain set? Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
Guest Posted August 5, 2005 Share Posted August 5, 2005 Yep, that's what I kinda expected. I visited and didn't see the osCID after a few clicks then left. Then I checked to see if the site had set a cookie and I couldn't find one. How do you have the cookie domain set? <{POST_SNAPBACK}> My cookie domain is set at ideal-handling.com Ideal-handling.com/catalog is my main site ideal-handling.co.uk/catalog is my aliased site Link to comment Share on other sites More sharing options...
AlanR Posted August 5, 2005 Share Posted August 5, 2005 My cookie domain is set at ideal-handling.comIdeal-handling.com/catalog is my main site ideal-handling.co.uk/catalog is my aliased site <{POST_SNAPBACK}> By the rules established a server at ideal-handling.co.uk should not be able to read a cookie set by ideal-handling.com, otherwise people would be stealing cookies right and left, a big security issue. So maybe you need to find a way to determine which domain your visitor is coming in on and redefine define('HTTP_COOKIE_DOMAIN', ''); on a case by case basis. This doesn't seem like a huge challenge but it's more than I have time to figure out. In the meanwhile if you're seeing traffic fall I'd set the site up to favor your uk domain since that's probably most important to you. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
Guest Posted August 8, 2005 Share Posted August 8, 2005 By the rules established a server at ideal-handling.co.uk should not be able to read a cookie set by ideal-handling.com, otherwise people would be stealing cookies right and left, a big security issue. So maybe you need to find a way to determine which domain your visitor is coming in on and redefine define('HTTP_COOKIE_DOMAIN', ''); on a case by case basis. This doesn't seem like a huge challenge but it's more than I have time to figure out. In the meanwhile if you're seeing traffic fall I'd set the site up to favor your uk domain since that's probably most important to you. <{POST_SNAPBACK}> Do you think that define('HTTP_COOKIE_DOMAIN', 'http://'.$HTTP_HOST); would work to define the cookies? Link to comment Share on other sites More sharing options...
♥Vger Posted August 8, 2005 Share Posted August 8, 2005 It has nothing to do with being a 'privacy nazi', but all to do with business sense. People are still hesitent about using the internet for carrying out transactions, but are partly reassured when they can see that their personal information is being handled securely. It's true that payment processing companies (Protx, Pay Pal) handle the actual transactions using ssl, but that still leaves the not so small matter of collecting personal data on the website either securely or insecurely. I for one would not submit Name, Address, Phone Number, E-mail Address, and Password for an account etc over an insecure connection where it could be intercepted by any half-competent hacker. Then there's the other not so small matter of the Data Protection Act ..... Vger Shhh... You'll have the privacy nazis here screaming about the sanctity of customer privacy. <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Guest Posted August 8, 2005 Share Posted August 8, 2005 Do you think that define('HTTP_COOKIE_DOMAIN', 'http://'.$HTTP_HOST); would work to define the cookies? <{POST_SNAPBACK}> Would this work then??????? Link to comment Share on other sites More sharing options...
Guest Posted August 9, 2005 Share Posted August 9, 2005 Would this work then??????? <{POST_SNAPBACK}> Anyone?? Link to comment Share on other sites More sharing options...
burt Posted August 9, 2005 Share Posted August 9, 2005 Wouldn't it be less stressful to use two hosting accounts pulling from 1 database. Simple, easy, effective. You could even have them on seperate IP's - .com in America, .co.uk in the UK for example. Then you have no geo-targetting worries for the Search Engines either. Link to comment Share on other sites More sharing options...
Guest Posted August 9, 2005 Share Posted August 9, 2005 Wouldn't it be less stressful to use two hosting accounts pulling from 1 database. Simple, easy, effective. You could even have them on seperate IP's - .com in America, .co.uk in the UK for example. Then you have no geo-targetting worries for the Search Engines either. <{POST_SNAPBACK}> Problems arise with that also :( multiple image files etc. Just looking for a simple way to get my uk and .com domain sites mirrored correctly. And changing two lines in the config file seems the easiest. define('HTTP_SERVER', 'http://'.$HTTP_HOST); works great, but I ned to know that it would work if I also used this method for the cookies, ie define('HTTP_COOKIE_DOMAIN', 'http://'.$HTTP_HOST); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.