网址自定义yii

时间:2015-01-19 12:03:23

标签: php yii

  

这是我想删除的网址   的 providerguid / 8469d0c7ddea6e568381c5ed24ecca88

这是我的链接: - http://localhost/frontsite/agemodern/site/steps/providerdetails/providerguid/8469d0c7ddea6e568381c5ed24ecca88

删除我使用的providerguid: -

   '/steps/providerdetails/<providerguid:\w+>'=>'/site/steps/providerdetails/providerguid/<providerguid>',

但它只删除了提供者guid键而不是像提供者一样/ 8469d0c7ddea6e568381c5ed24ecca88

我也试过这个:

RewriteCond %{THE_REQUEST} ^GET\s([^.]+)\.php\?urlname=([^&\s]+) [NC]
RewriteRule ^ %1/%2? [R,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/([^/]+)/?$ $1.php?id=$2 [L,QSA]

1 个答案:

答案 0 :(得分:0)

试试这个:

'site/steps/providerdetails/providerguid/<providerguid:\w+>'=>'/site/steps/providerdetails/providerguid/<providerguid>'