原创= http://ritetag.techreanimate.com/signin.php?network=twitter&fhfghdfghh=sadfgsdf rewrite = http://ritetag.techreanimate.com/signin/twitter?fhfghdfghh=sadfgsdf
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^signin/([^/]*)$ /signin.php?network=$1
我得到了这个工作,但我不能使用得到的其他变量后来,我如何重写为网络以外的东西工作。
答案 0 :(得分:0)
我解决了!
RewriteEngine On RewriteBase /
#This rewrite has no L flag so the second one can continue
#Signin.php can have multiple networks like signin/twitter = signin.php?network=twitter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^signin/([^/]*)$ /signin.php?network=$1 [QSA]
#this rewrite just allows to use files withouth the .php
# Like about instead of about.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ /$1.php [QSA]