Hi guys actually my url is "http://collection.com/alok/ranjan/dubey.php?pid=12" i want to remove two folder in between this url and my output will be "http://collection.com/dubey.php?pid=12" please help me. i am writing as shown belo开发者_如何学JAVAw
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^dubey.php?pid=([a-zA-Z0-9\-]+)$ alok/ranjan/dubey.php?pid=$1
I believe that there is a problem in the regex... it should be
^dubey.php?pid=([a-zA-Z0-9\-]+)$ alok/ranjan/dubey.php?pid=$1
you forgot to escape the '-' sign which is a special char in regex.
i am using this website for rewriting
http://webtools.live2support.com/misc_rewrite.php
shortest version:)
RewriteRule ^dubey.php?pid=([0-9]+)$ alok/rajan/dubey.php?pid=$1
精彩评论