Forum Moderators: phranque
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine On
RewriteRule ^product/([0-9]+)/$ /product.php?sku=$1
The part I've added to the htaccess file allows me to use product/1234 in the url but still be able to grab the sku as a GET variable. And as mentioned above, it works beautifully if I take the wordpress stuff out of the htaccess file. But then the rest of the site doesn't work. Any htaccess suggestions or help anyone?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Your code first
RewriteRule ^product/([0-9]+)/$ product.php?sku=$1 [L]
# WordPress start
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# WordPress end
</IfModule>