I'm using this permalink structure on my wordpress site : mysitedotcom/2011/09/mypost and i'm using rewrite rule 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

mysitedotcom/2011/09/mypost/visit, 

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

link|improve this question
feedback

migrated from stackoverflow.com Nov 20 '11 at 1:09

This question came from our site for professional and enthusiast programmers.

1 Answer

<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>
link|improve this answer
feedback

Your Answer

 
or
required, but never shown