Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use WooCommerce.
My links are looking like this at the moment:

http://www.mywebsite.com/shop/sample-product/

but I want them to be like this:

http://www.mywebsite.com/shop/1.html/
http://www.mywebsite.com/shop/2.html/
http://www.mywebsite.com/shop/3.html/
http://www.mywebsite.com/shop/4.html/
http://www.mywebsite.com/shop/5.html/
http://www.mywebsite.com/shop/x.html/

how do I change them?

share|improve this question
add comment

2 Answers

Why do you want this? I can't see any good reason. It's much better for both usability and SEO to have the titles in the permalinks. But if you REALLY want this, you can use "/shop/%post_id%.html" as a product permalink base. You change this under "Settings" -> "Permalinks" and then at the bottom under the section "Product permalink base". Put the following as a "Custom Base":

/shop/%post_id%.html

share|improve this answer
    
Thank you.I come from China.The China Products name is too long,I follow what you say,but the links become like this:/shop/%post_id%.html/sample-product/ –  user34335 Jun 21 '13 at 5:59
add comment

I tried answer by Pekz0r and It work if you used it with wordpress post but for woocommerce product it did not work maybe because the setting of wocommerce permalink defined just the url base which is url prefixes, I think you need to write your own rule in .htaccess

check http://codex.wordpress.org/Using_Permalinks for more info on permalinks and sample .htaccess

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.