替换'?'用' /'通过URL中的htaccess

时间:2014-04-29 11:47:17

标签: .htaccess

我有一个用htaccess规则创建的网址:

http://domain.com/foldername/name-in-location

这工作正常,当在此网址上并点击第2页时,它变为

http://domain.com/foldername/name-in-location?page=2

我希望将name-in-location?page=2替换为name-in-location/page-2

我当前的.htaccess如下所示:

RewriteCond %{THE_REQUEST} \ /+foldername/([^&]+)?page=([^&]+) 
RewriteRule ^ /JustFind/([^&]+)/%1? [L,R=301] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d – 

0 个答案:

没有答案