0

I'm using this permalink structure on my wordpress site:

example.com/2011/09/mypost

and I'm using RewriteRule to visit another site on .htaccess,

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ([0-9]+)/([0-9]+)/(.*)/visit visit-site.php?siteurl=$3 [NC]
</IfModule>

so I can visit the site with this link

example.com/2011/09/mypost/visit

sometime I want to change my permalink with structure like example.com/item/mypost when I can visit another site with example.com/item/mypost/visit, please help me to change the .htaccess code above so I can access with example.com/item/mypost/visit link.

1 Answer 1

0
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ([0-9]+)/([0-9]+)/(.*)/visit visit-site.php?siteurl=$3 [NC]
    RewriteRule item/(.*)/visit visit-site.php?siteurl=$1 [NC]
</IfModule>

You must log in to answer this question.