2017-04-26 96 views
0

我尝试从的.htaccess GET查询字符串不行

http://localhost/manual/$ 

重定向的URL

http://localhost/manual/index.php?type=post&post=$ 

我的.htaccess文件是

RewriteEngine On 
RewriteBase /manual/ 
RewriteCond %{REQUEST_FILENAME} !-f # Existing File 
RewriteCond %{REQUEST_FILENAME} !-d # Existing Directory 
RewriteRule . /manual/index.php? [L] 

RewriteRule ^([^/]*)\/$ type=post&post=$1 [L] 

但也不工作什么是错,帮助,对不起,如果重复,因为我还不明白创建htaccess。

回答

0

您可以使用下面的规则/manual/.htaccess

RewriteEngine on 

RewriteBase /manual/ 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(.+)$ index.php?type=post&post=$1 [L]