cannuck1964 Posted October 5, 2002 Share Posted October 5, 2002 Just curious, but why not make a new index.php page that contains lots of content, which links directly to your default.php page? Seems to me that if you have the right content, the search engines will still rank you high.... And an intro to your store might give people a chance to review what you are selling and offering anyways..... cheers.... Peter McGrath ----------------------------- See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation Link to comment Share on other sites More sharing options...
burt Posted October 5, 2002 Share Posted October 5, 2002 It's another click to get from an index page, to your sales pages...that extra click would put me off of buying from you... Vince: AFAIK, there would be no Spidering issues with the httpd.conf change nor with baonguyenx solution. Link to comment Share on other sites More sharing options...
baonguyenx Posted October 5, 2002 Share Posted October 5, 2002 Hi Peter, I think the original poster just wants to have the exact content of file catalog/default.php under his htdocs web root. He doesn't want to do the hard way by creating new file. The easiest way is to make 'default.php' under htdocs as a symbolic link to 'catalog/default.php'. Also, 'includes' folder under htdocs must exist since the codes in all osc pages are referring to the relative 'includes' folder. Just make 'includes' folder under htdocs points to 'catalog/includes' folder. Here are just the two simple commands to achieve that under htdocs!!! ln -s catalog/default.php default.php ln -s catalog/includes includes Gary, for some people if the are on a share hosting, they don't have access to make change of httpd.conf. Symbolic link is simple, and it is working on all my websites. Regards, Bn Link to comment Share on other sites More sharing options...
francis Posted December 11, 2002 Share Posted December 11, 2002 Just looking at a refresh option for a page inside the catalog area. What I have done is refreshed the checkout_payment.php to go directly to checkout_confirmation.php with the following head code: <meta http-equiv="refresh" content="0;URL=checkout_confirmation.php"> However, the main problem isn't that a refresh is accomplished successfully, but that the session is broken and therefore the whole session process is messed up. Is there some php code that I can use instead of the above to retain the integrity of the site? I did try: <meta http-equiv="refresh" content="0" URL=<? echo ' . tep_href_link(checkout_confirmation.php, 'NONSSL') . ';?>> But that's because my PHP knowledge is very basic! Any help, much appreciated. Link to comment Share on other sites More sharing options...
Carcrafter Posted December 11, 2002 Share Posted December 11, 2002 Why not just create an alias in Apache? Would that work? Ed Caggiani Custom Porsche accessories, news, discussions Link to comment Share on other sites More sharing options...
francis Posted December 12, 2002 Share Posted December 12, 2002 To be honest, I've no idea and wouldn't know where to start on that. However, I've been scratching my head all night over this one and think I've sorted it. Looking at what I did earlier, I replaced the code <meta http-equiv="refresh" content="0;URL=checkout_confirmation.php"> with <meta http-equiv="refresh" content="0;URL=<?php echo '' . tep_href_link(FILENAME_CHECKOUT_CONFIRMATION,'', 'SSL') . '';?>"> Now works a treat and brings the session information with it! Link to comment Share on other sites More sharing options...
blizeH Posted November 1, 2003 Share Posted November 1, 2003 Sorry to bring up an old topic - but is it easy to move all of the content to the root? I'd really like to do it, but don't think I have enough PHP knowledge to edit a load of files if the paths need changing. Thanks. Link to comment Share on other sites More sharing options...
chfields Posted November 1, 2003 Share Posted November 1, 2003 It is not difficult, you just move the files from the catalog folder to the root and then change the paths in both config files and your done Link to comment Share on other sites More sharing options...
digi Posted November 1, 2003 Share Posted November 1, 2003 I am suprised nobody has mentioned modifying the HTACCESS file, I have had the same problem before, and here is what I did, I just made my htaccess file look like this. (apache server) # $Id: .htaccess,v 1.2 by Steven Pignataro 08/27/02 hpdl Exp $ # # This is used with Apache WebServers # # The following makes adjustments to the SSL protocol for Internet # Explorer browsers # # For this to work, you must include the parameter 'Limit' to the # AllowOverride configuration # # Example: # #<Directory "/usr/local/apache/htdocs"> # ?AllowOverride Limit #</Directory> # # 'All' with also work. (This configuration is in your # apache/conf/httpd.conf file) DirectoryIndex /shop/catalog/default.php <IfModule mod_setenvif.c> ?<IfDefine SSL> ? ?SetEnvIf User-Agent ".*MSIE.*" \ ? ? ? ? ? ? nokeepalive ssl-unclean-shutdown \ ? ? ? ? ? ? downgrade-1.0 force-response-1.0 ?</IfDefine> </IfModule> *Outlined in chalk everone looks the same* Currently useing OSC 2.2 MS1 running on Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_jk/1.2.0 mod_perl/1.26 PHP/4.3.3 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b Link to comment Share on other sites More sharing options...
♥kymation Posted November 1, 2003 Share Posted November 1, 2003 Just to add one more trick to the list: My web hosting provider allows me to point the domain to any directory using their Control Panel. You can also ask your host to do this for you; most will be happy to oblige. Easier than messing with symbolic links and .htaccess files, although I have used both of those tricks before. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Queenoffun2001 Posted November 1, 2003 Share Posted November 1, 2003 Glad this old topic has been revisited ... I installed my website at www.generationsbookco.com without configuring ssl. When I went to add ssl, I got certificate from my hosting company, but it only covers stuff in my /secure directory (vs. /public where I currently have OSCommerce installed). I copied my public/catalog directories to /secure/catalog and then went to /secure/catalog/admin/includes/configure.php. Now I'm not sure exactly what to do. 1) Is it as simple as modifying: define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module to define('HTTPS_CATALOG_SERVER', 'https://www.securewebexchange.com/generationsbookco.com'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module 2) Also, do I have to change all the absolute references to the /secure directory (making everything run in secure) or is there logic built into oscommerce to only go to the /secure directory when a piece of sensitive data is being transmitted? 3) Finally, should my database be located within the /secure directory? Thanks for any help you can provide. Link to comment Share on other sites More sharing options...
Pixxi Posted January 4, 2004 Share Posted January 4, 2004 Hmm ... the symbolic links and the .htaccess file tips both work fine, but does anyone know how to arrange things so that when you click 'Top>>' on the breadcrumb line you actually get the first page of your OSC site rather than the Apache splash page? At present I have to click 'Catalog>>' to get the first page... confusing for customers ... TIA :) Link to comment Share on other sites More sharing options...
♥kymation Posted January 5, 2004 Share Posted January 5, 2004 I just removed the 'Top>>' entirely. The top level then becomes 'Catalog'. Just find this code in application_top.php: // include the breadcrumb class and start the breadcrumb trail require(DIR_WS_CLASSES . 'breadcrumb.php'); $breadcrumb = new breadcrumb; $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); and change the last line to this: $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2004 Share Posted February 10, 2004 I just uploaded a PHP redirect script at http://www.oscommerce.com/community/contributions,1867 This one is designed to redirect to same page but using SSL Link to comment Share on other sites More sharing options...
Pixxi Posted February 10, 2004 Share Posted February 10, 2004 Excellent Jim, thanks! :rolleyes: Link to comment Share on other sites More sharing options...
999 Posted February 11, 2004 Share Posted February 11, 2004 What's wrong with a simple redirect in the .htaccess file? When you goto myurl.com it just goes straight to myurl.com/shop ie. Redirect permanent /index.html http://myurl.com/shop/ I must admit I don't know how this would affect search engines though. Link to comment Share on other sites More sharing options...
♥kymation Posted February 11, 2004 Share Posted February 11, 2004 That will work just fine for your customers. Search engines are reputed to hate redirects; some even state that they will not follow them. I have no idea if this means redirects in the header (which the .htaccess trick will do) or only HTML redirects. Some people are running osCommerce on webhosts that do not allow .htaccess files, or on Windows servers that do not use .htaccess, so they need other ways to accomplish this. Fortunately there are several methods available. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
tammy507 Posted March 19, 2004 Share Posted March 19, 2004 I have copied ALL of my files (excluding the catalog folder--- which I had named store) to the root directory.... Now, in the config file how do I define the part where it USE to be store? define('HTTP_COOKIE_PATH', '/store'); define('HTTPS_COOKIE_PATH', '/store'); define('DIR_WS_HTTP_CATALOG', '/store/'); define('DIR_WS_HTTPS_CATALOG', '/store/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/var/www/html/store/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); Im a little lost... Thanks tammy Link to comment Share on other sites More sharing options...
Guest Posted March 19, 2004 Share Posted March 19, 2004 301 permanent redirects (using .htaccess) are search engine safe & the right way to handle moved pages. META refresh & variations have a spammy reputation and are frowned on (at best) by the search engines. I hope this helps, Bob That will work just fine for your customers. Search engines are reputed to hate redirects; some even state that they will not follow them. I have no idea if this means redirects in the header (which the .htaccess trick will do) or only HTML redirects. Some people are running osCommerce on webhosts that do not allow .htaccess files, or on Windows servers that do not use .htaccess, so they need other ways to accomplish this. Fortunately there are several methods available. Regards Jim Link to comment Share on other sites More sharing options...
tammy507 Posted March 20, 2004 Share Posted March 20, 2004 I have copied ALL of my files (excluding the catalog folder--- which I had named store) to the root directory.... I got it, thanks anyway. I just removed all "store" references. Link to comment Share on other sites More sharing options...
badboo Posted January 6, 2005 Share Posted January 6, 2005 I am suprised nobody has mentioned modifying the HTACCESS file,I have had the same problem before, and here is what I did, I just made my htaccess file look like this. (apache server) # $Id: .htaccess,v 1.2 by Steven Pignataro 08/27/02 hpdl Exp $ # # This is used with Apache WebServers # # The following makes adjustments to the SSL protocol for Internet # Explorer browsers # # For this to work, you must include the parameter 'Limit' to the # AllowOverride configuration # # Example: # #<Directory "/usr/local/apache/htdocs"> # ?AllowOverride Limit #</Directory> # # 'All' with also work. (This configuration is in your # apache/conf/httpd.conf file) DirectoryIndex /shop/catalog/default.php <IfModule mod_setenvif.c> ?<IfDefine SSL> ? ?SetEnvIf User-Agent ".*MSIE.*" \ ? ? ? ? ? ? nokeepalive ssl-unclean-shutdown \ ? ? ? ? ? ? downgrade-1.0 force-response-1.0 ?</IfDefine> </IfModule> <{POST_SNAPBACK}> Thanks for this idea - I still couldn't figure out if this is a good way for spiders and search engine rankings... Do you know? I have my index.php in the root filder it's not automatically loading by entering www.myurl.com so i had to use your suggestion... I appreciate your time! Casi Link to comment Share on other sites More sharing options...
♥kymation Posted January 6, 2005 Share Posted January 6, 2005 I have heard opinions on both sides, so I can't really say if this will hurt you. On the other hand, your webserver is perfectly capable of delivering the index.php as the default page. If you are running your own webserver, this is handled in the appropriate config file. If you are on a hosting service, you should be able to change your default in your host's Control Panel. If you can't find it in the CP you should ask them to change this for you. It's always best to have the server do the work for you. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
niknakgroup Posted January 9, 2005 Share Posted January 9, 2005 OK, my site has been up for a good while and i have over 4000 pages ranked by search engines. I dont want to lose these pages by changine things too much, but want to change from www.niknakgroup.com/jewellery/ (I changed the catalog folder to jewellery a while back) back down to www.niknakgroup.com - i can do this using my hosts control pane l quite easily, and know how to change the configure.php, but am confused as to how to get the 301 redirect in. I have tried putting in a new folder (current structure makes it www.niknakgroup.com/jewellery/jewellery) containing a 301 redirect to the main url, but will this work for people coming in on exact page links (i.e. www.niknakgroup.com/jewellery/index.php?cPath=297) so that they still get the correct page, and so that the search engines can still get back in on all th elinks they have found before. I also need to know my link exchange programme wont become completely irrelevant if I change things. Any help/advice greatly appreciated! Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem.... Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums..... if (stumped == true) { return(square_one($start_over) } else { $random_query = tep_fetch_answer($forum_query) } Link to comment Share on other sites More sharing options...
♥Vger Posted January 9, 2005 Share Posted January 9, 2005 Let's look at this a different way. Instead of trying to redirect someone to the root directory from somewhere else, why not make the redirect in .htaccess a 404 redirect (file not found), so that if they go to a page which no longer exists they will end up on the index page. This is good for established sites anyway as (over time) you are bound to delete pages which previously existed, and it's much better for people to end up on the index page than on a 404 error page. Vger Link to comment Share on other sites More sharing options...
Guest Posted January 9, 2005 Share Posted January 9, 2005 wow, all this for simply moving files . . one of those 'how many programers does it take to move a file' deal . . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.