Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

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

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

1 Answer 1

<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>
share|improve this answer

Your Answer

 
discard

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