Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

URL Rewrite


Get-Wireless 2

Recommended Posts

Posted

I currently have a memory configurator installed on my site. I gave them a call back url which is

 

www.mydomain.co.uk/catalog/kingston?

 

Kingston then tag that with the model number so it would be something like

www.mydomain.co.uk/catalog/kingston?KAC-MEME/1G

 

I then have a folder inside the catalog folder named kingston with the following in a .htaccess file

 

Options +FollowSymlinks

RewriteEngine On

RewriteBase /kingston

RewriteRule ^$ http://mydomain.co.uk/catalog/go_product.p...roducts_model=% {QUERY_STRING} [R]

 

How ever this doesnt seem to work.

 

What I would like to do is change this with the .htaccess file so that it changes the

 

www.mydomain.co.uk/catalog/kingston?

part to

http://mydomain.co.uk/catalog/go_product.php?products_model=

 

leaving just the model number there is this possible

Posted
I currently have a memory configurator installed on my site. I gave them a call back url which is

 

www.mydomain.co.uk/catalog/kingston?

 

Kingston then tag that with the model number so it would be something like

www.mydomain.co.uk/catalog/kingston?KAC-MEME/1G

 

I then have a folder inside the catalog folder named kingston with the following in a .htaccess file

 

Options +FollowSymlinks

RewriteEngine On

RewriteBase /kingston

RewriteRule ^$ http://mydomain.co.uk/catalog/go_product.p...roducts_model=% {QUERY_STRING} [R]

 

How ever this doesnt seem to work.

 

What I would like to do is change this with the .htaccess file so that it changes the

 

www.mydomain.co.uk/catalog/kingston?

part to

http://mydomain.co.uk/catalog/go_product.php?products_model=

 

leaving just the model number there is this possible

 

 

Try no folders just in catalog/.htaccess

 

RewriteRule ^(.*)kingston(.*)$ go_product.php?products_model=%{QUERY_STRING}

Posted
Try no folders just in catalog/.htaccess

 

RewriteRule ^(.*)kingston(.*)$ go_product.php?products_model=%{QUERY_STRING}

 

Hi,

 

Thanks for trying but now all I get is product not found. when I try to access the memory config page on my store, thats before I actually go through the process of finding which module I require.

 

I also tried it in the kingston folder. I also tried changing ^(.*)kingston(.*) to ^(.*)kingston?(.*) but still no joy :(

 

Regards

Shaun

Posted
Hi,

 

Thanks for trying but now all I get is product not found. when I try to access the memory config page on my store, thats before I actually go through the process of finding which module I require.

 

I also tried it in the kingston folder. I also tried changing ^(.*)kingston(.*) to ^(.*)kingston?(.*) but still no joy :(

 

Regards

Shaun

 

Doesn't necessarily mean its not working Shaun.

 

Did you try catching the $_GET['products_model'] at the top of application_top.php to see if the RewriteRule was actually doing its job?

Posted
Doesn't necessarily mean its not working Shaun.

 

Did you try catching the $_GET['products_model'] at the top of application_top.php to see if the RewriteRule was actually doing its job?

 

 

how do I do that please?

 

Kind regards

Shaun

Posted
how do I do that please?

 

Kind regards

Shaun

 

Well just add at the top of catalog/application_top.php (after the <?php)

 

// BOF REMOVE ME
( isset($_GET['products_model']) ? die('Products model was » ' . $_GET['products_model']) : NULL );
// EOF REMOVE ME

Posted
Well just add at the top of catalog/application_top.php (after the <?php)

 

// BOF REMOVE ME
( isset($_GET['products_model']) ? die('Products model was » ' . $_GET['products_model']) : NULL );
// EOF REMOVE ME

 

 

Thanks for that, I now kinda have it working using what I already had. What the above did was enable me to find what Kingston where sending back to me.

 

So I now have a new problem.

 

Kingston say their part number is: KAC-MEME/1G

What I am actually get sent is: KAC%2DMEME%2F1G

 

So once I changed the Model Number to KAC%2DMEME%2F1G it worked exactly as I had it already setup.

 

So my guess here is that for some reason the - is being translated into %2D and the / translated to %2F

 

When on the config tho if i hover over the link to that memory module it displays the link as www.mydomain.co.uk/kingston?KAC-MEME/1G

 

so between kingstons configer and my site its getting changed.

 

My other problem is that its run in an IFRAME and when I click to view\ add product it doesnt put it the parent window but leaves it within the IFRAME.

 

Kind Regards

Shaun

Posted

I have noticed that if I hover over the link using firefox I see www.get-wireless.co.uk/Shop/kingston?KAC-MEME/1G

But If I use IE I see www.get-wireless.co.uk/Shop/kingston?KAC%2DMEME%2F1G

 

So what I need to know is what are kingston actually send to me? Is there a way to find out?

Posted

 

Thanks Burt,

 

Although I understand that concept I have no idea how to modify it to suit my needs or as to which file or files I would need to put it in to.

 

Can you suggest how I would go about it?

 

Regards

Shaun

Archived

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

×
×
  • Create New...