Some pages of my Wordpress don't work after creating a custom permalink for products URL in my localhost environment. Home page works, but for example /contact page returns 404. If I look at Apache log, it appears a 404 from /contact. My environment is with WAMP and Windows 10.
I have tried the most common things I have read like:
- Enable mod_rewrite.
Modify httpd.conf with:
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Reset permalinks to default and change back as desired.
<Directory /> Options FollowSymLinks AllowOverride All </Directory>
mod_rewrite is enabled, Wordpress have permission to edit .htaccess and if I delete .htaccess and recreate permalinks, htaccess is created again.
My permalinks are %parent_category% and %keyword%, so URL for products are: .../parent_category/keyword/product-name.
For %parent_category%, I get the parent category of the product (WooCommerce) and for %keyword% I get it from Yoast SEO keyword field of the product.
What else can I check?