htaccess,在路径内创建虚假路径

时间:2017-01-16 20:19:54

标签: php apache .htaccess

我想在目录

中创建一个false子目录路径

原始网址:

  

http://localhost/abracadabra/?doce=1&travessura=9

CURRENT URL(MY HTACCESS):

  

http://localhost/abracadabra/1/9

我想:

  

http://localhost/abracadabra/1/permalink/9

“永久链接”,我想要这个错误的路径

当前的HTACCESS:

  

RewriteRule ^ abracadabra /([^ /] *)$ /abracadabra/index.php?doce=$1 [L]

     

RewriteRule ^ abracadabra /([0-9] +)/([0-9] +)$   /abracadabra/index.php?doce=$1&travessura=$2 [L]

1 个答案:

答案 0 :(得分:0)

RewriteEngine On
RewriteRule ^abracadabra/([^/]*)$ /abracadabra/index.php?doce=$1 [L]
RewriteRule ^abracadabra/([0-9]+)/([0-9]+)$ /abracadabra/index.php?doce=$1&travessura=$2 [L]
RewriteRule ^abracadabra/([0-9]+)/permalink/([0-9]+)$ /abracadabra/index.php?doce=$1&travessura=$2 [L]

希望它有所帮助!