2017-03-07 43 views
1

創建網址如下:不url中友好PHP方法下班

例如[點] com/index.php的C = 2

例如[點] com /任何/ 2

我想使用的網址一樣http://example.com/any/2?p=1在PHP

得到變量 'p' 和不想使用URL frindly用於獲取變量 'p'

這可能嗎?

這是我在.htaccess代碼:

Options +FollowSymLinks 
RewriteEngine On 
RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteRule ^([a-zA-Z]+)/(.*)$ ./index.php?c=$2 

回答