Oct 6, 2013

OsCommerce - Ultimate SEO URLs - Redirect Loop

I just installed OsCommerce and tried to make the URLs a bit more friendly. I guess all of us want that, I really don't know why the OsCommerce guys doesn't make this as a built in option...

So, I installed the latest Ultimate SEO URLs add-on which is v22d_12 right now.
Very useful and easy... but when I tried to click a link... OUPS...not working - "This webpage has a redirect loop" (Chrome) or "The page isn't redirecting properly" (FireFox)

U G L Y ... right?!

I searched a bit the web... but nothing. There were a lot of people asking for direction about this issue but I could't find anything helpful.

The solution is actually very easy.
Open your config.php file (it is under /catalog/includes/configure.php). Well, you will find some variables defined as empty strings.
The HTTP_COOKIE_DOMAIN, HTTP_COOKIE_PATH and HTTP_SERVER were also empty.

Now, you know what you have to do, right?

define('HTTP_SERVER', 'http://put-your-domain-here.com');

...aaaand add some slashes here:

define('HTTP_COOKIE_DOMAIN', '/');
define('HTTP_COOKIE_PATH', '/');

Now test it!

It's working? YaY!

It's not working?! well... I'm sorry :(