WordPress and Prestashop MOD REWRITE
-
For legacy reasons, I have to run WordPress alongside a PrestaShop installation.
All works fine until I switch on friendly URLs when I either find that most of the Prestashop pages don’t appear or I get 403 errors or weird pages instead of the blog posts.
This has to be the .htaccess file and the MOD REWRITE rules (about which I have little understanding)
My current .htaccess file is
RewriteEngine On # BEGIN WordPress ## <IfModule mod_rewrite.c> RewriteBase /blog.php/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog.php/index.php [L] ## </IfModule> # END WordPress # BEGIN PrestaShop URL rewriting rules RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php # END PrestaShop URL rewriting rules
I’m sure if you get MED REWRITE, the answer is screaming at you. Can you get it to scream at me?
m
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WordPress and Prestashop MOD REWRITE’ is closed to new replies.