langers Posted January 7, 2004 Share Posted January 7, 2004 Does anyone know if there is one available or if it is even possible? Link to comment Share on other sites More sharing options...
jrwrestling Posted January 7, 2004 Share Posted January 7, 2004 Not exactly sure what it is you are looking for. Link to comment Share on other sites More sharing options...
Guest Posted January 8, 2004 Share Posted January 8, 2004 There is a very alpha version called YASU that is in the contributions section. Hth, Matt Link to comment Share on other sites More sharing options...
langers Posted January 18, 2004 Author Share Posted January 18, 2004 Thanks. Will have a look now Link to comment Share on other sites More sharing options...
langers Posted January 21, 2004 Author Share Posted January 21, 2004 There is a very alpha version called YASU that is in the contributions section. Hth, Matt Hi mate, Is this one you developed? Link to comment Share on other sites More sharing options...
vanpuffelen Posted March 21, 2004 Share Posted March 21, 2004 Tried to instal it but first of all I don't use the catalog setup, so I had to modify it so it would exclude teh catalog settings, and after that I only got it a few times almost running, it would parse the name after the general url but would return at the basic 404 page for search results, Link to comment Share on other sites More sharing options...
whaou Posted April 3, 2004 Share Posted April 3, 2004 Hi, I 've got one problem with the contribution Yasu. My website is located in the folder \www and i have my folder mysql in \www. (it name is \phpmysql256) Before this install, it was possible to acces at my mysql base with my browser like that: http://www.toto.com/phpmysql256 Now, with this contrib, it's no possible. When i write that in my browser, the word phpmysql appears in the welcome page in the module "ADVANCED SEARCH RESULT". I thinh, there is a problem with the file rewrite.php or with my .htaccess. my htacces: Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule admin - [L] RewriteRule catalog$ index.php [R,L] RewriteRule catalog/$ index.php [R,L] RewriteCond %{REQUEST_URI} !-d RewriteCond %{REQUEST_URI} !^/$ RewriteRule !\.(gif|php|css|jpg)$ rewrite.php my file rewrite.php: <?php /* Some parts Copyright 2004 osCommerce Remainder Copyright 2004 eCartz.com, Inc. */ include('includes/application_top.php'); if ($REQUEST_URI == '/catalog/') { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } if ($REQUEST_TYPE == 'SSL') { $comparison_array = explode('/', HTTPS_SERVER . DIR_WS_HTTPS_CATALOG, 4); } else { $comparison_array = explode('/', HTTP_SERVER . DIR_WS_HTTP_CATALOG, 4); } $comparison = $comparison_array[3]; $parts = explode('?', str_replace($comparison, '', $REQUEST_URI), 2); $list = explode('/', preg_replace(array('#^/#', '#/$#'), '', $parts[0])); if (sizeof($parts) == 2) { $parameters = explode('&', $parts[1]); foreach ($parameters as $pair) { $pieces = explode('=', $pair); $HTTP_GET_VARS[$pieces[0]] = $pieces[1]; } } $current_category_id = 0; $cPath_array = array(); $count = 0; foreach ($list as $piece_encoded) { $count++; $piece = urldecode(preg_replace(array('/[+]/', '/%20/'), array(' ', '%2F'), $piece_encoded)); if ($piece == 'catalog') { continue; } $query_string = "select cd.categories_id from categories_description cd, categories c where cd.categories_id=c.categories_id and cd.categories_name='" . tep_db_input($piece) . "' and c.parent_id='" . (int)$current_category_id . "'"; $category_query = tep_db_query("select cd.categories_id from categories_description cd, categories c where cd.categories_id=c.categories_id and cd.categories_name='" . tep_db_input($piece) . "' and c.parent_id='" . (int)$current_category_id . "'"); if ($category_array = tep_db_fetch_array($category_query)) { $cPath_array[]= $category_array['categories_id']; $breadcrumb->add($piece, tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', $cPath_array))); $current_category_id = $category_array['categories_id']; } else { if ($current_category_id != '0') { $parent_where_string = " and p2c.categories_id='" . (int)$current_category_id . "'"; } else { $parent_where_string = ''; } $product_query = tep_db_query("select pd.products_id from products_description pd, products_to_categories p2c, products p where p.products_id = pd.products_id and p.products_status = '1' and pd.products_id=p2c.products_id and pd.products_name='" . tep_db_input($piece) . "'" . $parent_where_string); if ($product_array = tep_db_fetch_array($product_query)) { if (sizeof($cPath_array) < 1) { $cPath = tep_get_product_path($product_array['products_id']); $cPath_array = explode('_', $cPath); for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } else { $cPath = implode('_', $cPath_array); } $breadcrumb->add($piece, tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $product_array['products_id'])); $HTTP_GET_VARS['products_id'] = $product_array['products_id']; $PHP_SELF_REWRITE = dirname($PHP_SELF) . '/' . FILENAME_PRODUCT_INFO; $PHP_SELF = $PHP_SELF_REWRITE; include(FILENAME_PRODUCT_INFO); exit(); } else { $manufacturer_query = tep_db_query("select manufacturers_id from manufacturers where manufacturers_name='" . tep_db_input($piece) . "'"); if ($manufacturer_array = tep_db_fetch_array($manufacturer_query)) { $breadcrumb->add($piece, tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', $cPath_array) . 'manufacturers_id=' . (int)$manufacturers_array['manufacturers_id'])); $HTTP_GET_VARS['manufacturers_id'] = $manufacturer_array['manufacturers_id']; if ($count == sizeof($list)) { $HTTP_GET_VARS['filter_id'] = $current_category_id; $PHP_SELF_REWRITE = dirname($PHP_SELF) . '/' . FILENAME_DEFAULT; $PHP_SELF = $PHP_SELF_REWRITE; $cPath = implode('_', $cPath_array); $HTTP_GET_VARS['cPath'] = $cPath; include(FILENAME_DEFAULT); exit(); } } else { reset($list); tep_redirect(tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords=' . implode('+', $list))); } } } } $cPath = implode('_', $cPath_array); $HTTP_GET_VARS['cPath'] = $cPath; $PHP_SELF_REWRITE = dirname($PHP_SELF) . '/' . FILENAME_DEFAULT; $PHP_SELF = $PHP_SELF_REWRITE; include(FILENAME_DEFAULT); ?> i need help, please. sorry for my english Link to comment Share on other sites More sharing options...
langers Posted April 3, 2004 Author Share Posted April 3, 2004 its the .htaccess file I believe. Dont think it allows for directories to be called (without specifying a document) i.e. www.mysite.com/directory It may be to do with this line: RewriteCond %{REQUEST_URI} !-d Link to comment Share on other sites More sharing options...
♥ecartz Posted April 4, 2004 Share Posted April 4, 2004 its the .htaccess file I believe. Dont think it allows for directories to be called (without specifying a document) i.e. www.mysite.com/directory It may be to do with this line: RewriteCond %{REQUEST_URI} !-d It's certainly the .htaccess file. However, the line quoted would make it *not* send the URL to rewrite.php. The idea was to make it not use the rewrite when there was an actual directory by that name. I suspect that it doesn't work because it's only a relative path. Adding in the path to the web directory might fix it (and the mysql admin as well). Looking at the admin line, I think that you need a line that says something like this: RewriteRule phpmysql256 - [L] Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
whaou Posted April 4, 2004 Share Posted April 4, 2004 I add in my file htaccess the line : RewriteRule phpmysql256 - [L] now, all is good. thanks a lot. to ecatz & langers. Link to comment Share on other sites More sharing options...
Guest Posted April 7, 2004 Share Posted April 7, 2004 I've got YASU running on a test site. it seems to work fine but the add to cart buttons won't work now. the urls still have the product id number in them instead of the rewritten named url. any ideas on this? might it have to do with STS being installed also? any help I would appreciate. Also - is it possible to change the + in the urls to a _ or a - A Link to comment Share on other sites More sharing options...
♥ecartz Posted April 7, 2004 Share Posted April 7, 2004 Sure. You just need to add 2-4 str_replace function calls to handle the translation: 1. Optional: after the url encode in the tep_href_link function, - to the appropiate %ASCII value. 2. Next, + to -. 3. Before the url decode in rewrite.php, - to +. 4. If you did 1, convert the %ASCII value back into -. Without 1 and 4, you won't be able to use dashes in the product, category, or manufacturer names. Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2004 Share Posted April 8, 2004 THANKS! ANy chance I could get you to post the code with the changes you mentioned implemented? Any ideas on why the shopping cart buttons aren't working? I can email you the link to the test area if you want. Link to comment Share on other sites More sharing options...
koksal Posted June 21, 2004 Share Posted June 21, 2004 Following is my .htaccess file and I cannot use my admin section now. When i type http://www.my-site/dog-toy-dog-food/admin I get advanced search page trying to search the string "admin" Any ideas about how I can get my admin back? Thanks Options +FollowSymLinks RewriteEngine on RewriteBase /dog-toy-dog-food RewriteRule admin - [L] RewriteRule dog-toy-dog-food$ /dog-toy-dog-food/index.php [R,L] RewriteRule dog-toy-dog-food/$ /dog-toy-dog-food/index.php [R,L] RewriteCond %{REQUEST_URI} !-d RewriteCond %{REQUEST_URI} !^/$ RewriteRule !\.(gif|php|css|jpg)$ /dog-toy-dog-food/rewrite.php Link to comment Share on other sites More sharing options...
♥ecartz Posted June 21, 2004 Share Posted June 21, 2004 Does http://www.my-site/dog-toy-dog-food/admin/index.php work? Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
koksal Posted June 22, 2004 Share Posted June 22, 2004 Unfortunately:-( it does not. I am stuck now. Does it work with everyone else OK? KC Link to comment Share on other sites More sharing options...
synamax Posted July 8, 2004 Share Posted July 8, 2004 I'm having this same issue :unsure: I cannot access my admin directory for the site. Also, none of the 'buy now' buttons are working properly. Can anybody help? - allen Link to comment Share on other sites More sharing options...
koksal Posted July 22, 2004 Share Posted July 22, 2004 it was because I had place the .htaccess to the subdirectory instead of the root. Thats why it was not working. Now it works fine after I put it back to root. Koksal One-stop-ecommerce.com TheLittleBig Amazam.com - an Amazon affiliate site Link to comment Share on other sites More sharing options...
koksal Posted July 31, 2004 Share Posted July 31, 2004 Hmm, I just noticed that my add to cart, buy now, and review buttons do not work since I added YASU module. Any ideas why it would not work, or has anyone had the same problem who successfully fixed the issue? Thanks KC Link to comment Share on other sites More sharing options...
koksal Posted July 31, 2004 Share Posted July 31, 2004 also turn your OSC SEF setting to off Link to comment Share on other sites More sharing options...
EricK Posted August 4, 2004 Share Posted August 4, 2004 Dont think it allows for directories to be called (without specifying a document) i.e. www.mysite.com/directory It may be to do with this line: RewriteCond %{REQUEST_URI} !-d With YASU installed "http://mydomain.com/" no longer resolves to index.php, instead it resolves to the Advanced Search page displaying the error "At least one of the fields in the search form must be entered." This is similar to whaou's problem resolved by RewriteRule phpmysql256 - [L] Is there a way "mydomain.com" or "mydomain.com/" can resolve to "mydomain.com/index.php"? Thank you, EricK Link to comment Share on other sites More sharing options...
♥ecartz Posted August 5, 2004 Share Posted August 5, 2004 RewriteRule ^$ /index.php [R,L] RewriteRule ^/$ /index.php [R,L] are supposed to make the bare domain resolve to index.php Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
koksal Posted August 5, 2004 Share Posted August 5, 2004 I have two websites installed on the same server with the same configuration and all, they both have YASU installed. On one I can login to admin section, on the other when I type www.mysite.com/admin it brings me to advanced search page. The only difference is that the first one is installed in a subdirectory like www.mysite.com/subdirectory/admin Any ideas why I am having this issue? Thanks KC Link to comment Share on other sites More sharing options...
EricK Posted August 6, 2004 Share Posted August 6, 2004 Thanks Matt, that fixed the directory path issue. I replaced this: Options +FollowSymLinks RewriteEngine on RewriteBase /catalog RewriteRule admin - [L] RewriteRule catalog$ /catalog/index.php [R,L] RewriteRule catalog/$ /catalog/index.php [R,L] RewriteCond %{REQUEST_URI} !-d RewriteCond %{REQUEST_URI} !^/$ RewriteRule !\.(gif|php|css|jpg)$ /catalog/rewrite.php with this for carts installed in the web root directory: Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule admin - [L] RewriteRule ^$ /index.php [R,L] RewriteRule ^/$ /index.php [R,L] RewriteCond %{REQUEST_URI} !-d RewriteCond %{REQUEST_URI} !^/$ RewriteRule !\.(gif|php|css|jpg)$ /rewrite.php Now the prob. is going to any https:// page causes a 500 Server Error. I have a dedicated SSL cert; is there a way to disable Mod_Rewrite for all secure pages? or another suggestion? Thanks again, EricK Link to comment Share on other sites More sharing options...
EricK Posted August 9, 2004 Share Posted August 9, 2004 Two questions about YASU: 1. Because spiders supposedly don't crawl https:// links, how would I disable YASU for secure pages? 2. How would I add .html to the URLs? Thank you, EricK Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.