Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php htaccess提供的URL短消息器_Php_.htaccess - Fatal编程技术网

Php htaccess提供的URL短消息器

Php htaccess提供的URL短消息器,php,.htaccess,Php,.htaccess,我当前的网址是 http://localhost/ssl_project/gp_crm/home.php?route=user_create 但我想把它表现为 http://localhost/ssl_project/gp_crm/user_create 我正在.htaccess RewriteEngine On Options +FollowSymLinks RewriteCond %{THE_REQUEST} ^(GET|HEAD|POST)\ /ssl_project/gp_crm/h

我当前的网址是

http://localhost/ssl_project/gp_crm/home.php?route=user_create
但我想把它表现为

http://localhost/ssl_project/gp_crm/user_create
我正在
.htaccess

RewriteEngine On
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^(GET|HEAD|POST)\ /ssl_project/gp_crm/home\.php\?route=([^&]+)
RewriteRule ^ /ssl_project/gp_crm/home/%2/%3?%4 [L,R=301]
RewriteRule ^/?ssl_project/gp_crm/home/([0-9]+)/(.*)$ /ssl_project/gp_crm/home.php?route=$1 [L,QSA]
我用了这个密码后

错误500


请帮助我。

下面的规则应该有效,如果它与您的其他规则不冲突,请在您的gp\U crm目录中使用它

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\/])$ home.php?route=$1 [L]

下面的规则应该有效,如果它与您的其他规则不冲突,请在您的gp\U crm目录中使用它

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\/])$ home.php?route=$1 [L]