I have got 2 rewrite rules which work, but pub/ is added to the url when i dont want that.
I add the rules to pub/.htaccess. If i add them to the .htaccess in the magento root, nothing happens.
The URL https://www.example.com/xerox-everyday-toner-for-tn242y-yellow-toner-cartridge-006r04226
becomes https://www.example.com/pub/xerox-everyday-toner-for-tn242y-yellow-toner-cartridge
.
My rules are to remove the SKU at the end, but as i have URLs like https://www.example.com/refilled-hp-953xl-ink-cartridge-multipack
I need the first rule as well.
My rules are:
RewriteRule -cartridge-multipack$ - [L]
RewriteRule (.+-cartridge)-.+$ $1 [R=302,L]
This is to rewrite some old product URLs that have been indexed by google. (The 302 is just while im testing, this will eventually become 301 when know it works)
Where do i add rules to stop pub/ being added?