在url上用2个参数重写htaccess条件

时间:2017-11-08 20:26:24

标签: php .htaccess

我正在尝试使用2个参数显示更好的url格式,我得到了这个

http://example.com/job.php?page=4045

我获得了这种格式,

 http://example.com/4045/job

使用此htaccess,

RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^([a-zA-Z0-9_-]+)/\job$ job.php?page=$1
RewriteRule ^([a-zA-Z0-9_-]+)/\job$ job.php?page=$1

并且正在运行,但我想在这个网址上有两个参数,

http://example.com/job.php?page=4045&page1=5055

我试过了,

RewriteRule ^([a-zA-Z0-9_-]+)/\job$ job.php?page=$1&page1=$1
RewriteRule ^([a-zA-Z0-9_-]+)/\job$ job.php?page=$1&page1=$1

但没有任何帮助?

0 个答案:

没有答案