tixpf
Regular Member
- Dec 1, 2013
- 295
- 115
Hi there,
I need a redirect for a couple of pages on my WP shop. It's quite simple to explain, but I have no idea how to write a .htaccess file.
Here's what I need:
I've got URLs like vvv.shop.com/category1/ vvv.shop.com/category2/ vvv.shop.com/category3/
The categories themselves have no content. What I want now if someone clicks category 1, 2 or 3 from my menu to be redirected to the first product from that category.
Like this:
Click on: vvv.shop.com/category1/ ---> Redirect to: vvv.shop.com/category1/product1
Click on: vvv.shop.com/category2/ ---> Redirect to: vvv.shop.com/category2/product1
Click on: vvv.shop.com/category3/ ---> Redirect to: vvv.shop.com/category3/product1
Important:
Remember, this is on a WP site. The products have no .html or .php ending. If they did, I'd be able to write the .htaccess file myself, but I have no idea how to write it for directories.
I need a redirect for a couple of pages on my WP shop. It's quite simple to explain, but I have no idea how to write a .htaccess file.
Here's what I need:
I've got URLs like vvv.shop.com/category1/ vvv.shop.com/category2/ vvv.shop.com/category3/
The categories themselves have no content. What I want now if someone clicks category 1, 2 or 3 from my menu to be redirected to the first product from that category.
Like this:
Click on: vvv.shop.com/category1/ ---> Redirect to: vvv.shop.com/category1/product1
Click on: vvv.shop.com/category2/ ---> Redirect to: vvv.shop.com/category2/product1
Click on: vvv.shop.com/category3/ ---> Redirect to: vvv.shop.com/category3/product1
Important:
Remember, this is on a WP site. The products have no .html or .php ending. If they did, I'd be able to write the .htaccess file myself, but I have no idea how to write it for directories.