繁体   English   中英

如何使用php从url中删除问号

[英]How to Remove Question marks from url using php

朋友请帮帮我,我的url重定向有问题我想重写我的url

当前网址是http://localhost/example.com/how-to-remove-question-marks

应该重定向为

http://localhost/example.com/how-to-remove-question-marks/

看看这个:

RewriteEngine on
# pass-through if another rewrite rule has been applied already
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]
# Define static redicts
RewriteRule ^image/(.+)$ public/image/$1 [L,QSA]
RewriteRule ^css/(.+)$ public/css/$1 [L,QSA]
RewriteRule ^js/(.+)$ public/js/$1 [L,QSA]
RewriteRule ^lib/js/core/(.+)$ core/lib/js/$1 [L,QSA]
RewriteRule ^lib/js/(.+)$ public/lib/js/$1 [L,QSA]
RewriteRule ^cache/(.+)$ public/cache/$1 [L,QSA]
RewriteRule ^download/(.+)$ public/download/$1 [L,QSA]

# Define custom redicts
RewriteRule ^page/([0-9]+)$ index.php?path=index.php&page=$1 [L,QSA]

RewriteRule ^(.+)$ index.php?path=$1 [L,QSA]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM