I have a little project integrating a 3rd party application, which seems pretty easy and straight forward for the most part. However, it requires some internal Routing to be set in place, in order to work, along with some Pass-Through Redirects.
Joomla Redirect plugin doesn;tdoesn't allow for this, so my idea is to use .htaccess to acheiveachieve this. I'm not much good with htaccess, and don't understand joomlaJoomla routing deep and well enough to modify it or create custom components... but this is the furtherest I've gotten with htaccess rewriteRule:
RewriteRule ^/product/* /product/$1 [QSA,PT]
The idea is to have a Joomla article with a specific DIV tag, where the product details will be loaded into. This div is located at: /product/ When the user clicks on a product to view details, the URL will change to: /product/product-name
This does not exist in Joomla, so you get a 404 error. The RewriteRule is supposed to point everything after /product/* to /product/, but leave the URL structure intact.
As I understand it, a Pass-Through redirect shouldn't result in a 404 error, so I must be missing something?
Out of curiosity, I tried just this rewriteRule to see if it actually triggers:
RewriteRule ^product/* /collection/$1 [QSA,PT]
It does not work, /product/ is still in the URL. However this exact rewriteRule works in an online htaccess Tester: https://htaccess.madewithlove.com?share=a7610055-95fd-4ed1-9f12-d60f14e44358
I must be doing something wrong, but I've been working on this for a week and haventhaven't gotten anywhere. I hope someone here has the answer.
Thanks guys. Sorry for the long post.