Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Use Search-Engine Safe URLs (still in development)


Guest

Recommended Posts

Posted

If Use Search-Engine Safe URLs (still in development) was accidentally turned on would it cause the cart to empty each time I add a new produtc?. A funny url displays on the address bar with a cId which I guess is a session ID. And all of a sudden my cart seems to empty each time I go to the home page. Any help would be appreciated.

 

Thanks

Posted

Did you hard code links in your webpage anywhere? <a href'".....etc.?

If you did you will have to change them over to the tep_href_link function so that the session ID gets added correctly.

Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Posted

Yes I did hardcode some links

 

Did you hard code links in your webpage anywhere? <a href'".....etc.?

If you did you will have to change them over to the tep_href_link function so that the session ID gets added correctly.

Posted

It doesn't matter whether you did or didn't hardcode any links, put quite simply - the 'Use Search Engine Safe URL's' feature doesn't work - don't turn it on. It will screw up all of your file pathways.

 

Vger

Posted

Yes, get a dedicated IP address for your site, install a ful SSL certificate, and then you can turn on the 'Force Cookie Use' feature, which will get rid of session ids.

 

Vger

Is there a way to not use the session Id in the url?

Posted

Yes I have a dedicated Ip and an SSL cert it almost works but still cant add to cart, it keeps saying enable cookies in order to purchase.

 

Any ideas?

 

Yes, get a dedicated IP address for your site, install a ful SSL certificate, and then you can turn on the 'Force Cookie Use' feature, which will get rid of session ids.

 

Vger

Posted

Yes, but is it a full SSL cert (https://www.yourdomain.com) or are you using a shared ssl? If you have a full ssl cert then the feature should work.

 

If you have a full ssl cert then post your configure.php files here (minus db username and password) and I'll take a look at them.

 

Vger

 

p.s. Have now answered your PM

Posted
Yes, but is it a full SSL cert (https://www.yourdomain.com) or are you using a shared ssl?  If you have a full ssl cert then the feature should work.

 

If you have a full ssl cert then post your configure.php files here (minus db username and password) and I'll take a look at them.

 

Vger

 

p.s. Have now answered your PM

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://mydomain.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://mydomain.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/');
 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', '/home/sites/mysite/web/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'dbhostname'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'username');
 define('DB_SERVER_PASSWORD', 'passwwd');
 define('DB_DATABASE', 'cycledeal');
 define('USE_PCONNECT', 'true'); // use persistent connections?
 define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'
?>

Posted

This:

define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com');
define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com');

Should be this:

define('HTTP_COOKIE_DOMAIN', '.mydomain.com');
define('HTTPS_COOKIE_DOMAIN', '.mydomain.com');

NOTE: leave the "." in front of the domain name so the cookie scope is domain wide.

Posted

Also, it appears as though you use the non-canonical form of URL (without the www. in front) so add this to your .htaccess file:

# =============================================================
#   <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
#   -----------------------------------------------------------
#    Rewrite the IP to non-canonical
    RewriteCond %{HTTP_HOST} 255\.255\.255\.255
    RewriteRule ^(.*)  http://yourdomain.com/$1 [L,R=301]
#   -----------------------------------------------------------
#    Rewrite the canonical URL to the non-canonical
    RewriteCond %{HTTP_HOST} www\.yourdomain\.com [NC]
    RewriteRule ^(.*)  http://yourdomain.com/$1 [L,R=301]
#   -----------------------------------------------------------
  </IfModule>
# =============================================================

This rewrite the URL and sends 301 headers for all www. -> non-canonical form transparently.

Posted

Thats funny,

 

I have search engine safe URL's turned on and everything works perfectly.

The only problem I've came across that I havent been able to fix is that it converts ?'s to / in path names that I sometimes need.

Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Posted

It converts everything in the URL to $_GET parameters...what do you need fixed?

Posted

when i change to search angine safe urls, i receive the page not found generated by apache 2 web server. can any one give me a helping hand ?!!

Posted

i also am using it and it seems to work fine except in two cases that it does not pass the variable

1- i am trying to pass a variable to my allprods.php

i am using this

'<a href="' . tep_href_link("allprods.php",  'fl=E', 'NONSSL') . '"> E |</A>' .

and i have

$firstletter=$HTTP_GET_VARS['fl'];

  if (!$HTTP_GET_VARS['page']){

    $where="where p.products_status=1 and pd.products_name like '$firstletter%'";

  }else {

    $where="where p.products_status=1";

  }

it wont pass the 'fl' when i set the sef under development to true

2- i have an invoice.php in the catalog section and the link is

<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_PRINTABLE, 'order_id=' . $orders['orders_id'], 'SSL') . '">' . tep_image_button('button_printorder.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?></td>

but order_id is not passed when i am seting the sef to true

othervise everything else seems to work

can i pass these variables when the sef is set to true

Posted

Hi,

 

I also have some problems when i turn on the search engine safe URLs.

 

Homepage is okay but the rest of the sites have broken images and the font and size changed.

 

This is my site: http://www.asiaintel.com. Please Help.

 

alicia

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...