We have woocommerce installed. We are trying to integrate a third party API. The server sends a request to Woocommerce to get a particular info.
When the URL is:
It says not found.
However, when we change the parameter "product" in above URL to Product or product1, it works fine. Ex: http://demo.geelani.net/s2pw/test/test1/?id=guid&call=GetPrices&Product=2100022;2100023;2100022e&quantity=2&additionalSheetCount=4
We feel the issue is how the products are fetched by woocommerce and is conflicting with it. It has to do with permalinks or wordpress.
One possible solution is rewriting the URL using htacces. but how do we do this?
The current .htaccess file looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /s2pw/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /s2pw/index.php [L]
</IfModule>
# END WordPress
I changed it to this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /s2pw/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /s2pw/index.php [L]
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /test/test1/\?id=(.*)&call=(.*)&product=(.*)\ HTTP
RewriteRule ^ /test/test1/?id=%2&call=%3&Product=%4? [R=301,L,NE]
</IfModule>
# END WordPress