标签云

微信群

扫码加入我们

WeChat QR Code

I have a link http://mysite.com/myname which shows the profile page.. But if i use multipleslashes like http://mysite.com///myname , it also shows the page.. My htaccess code is : RewriteCond %{REQUEST_URI} ^/(\w+)/?$ [NC]RewriteRule ^ profile.php?username=%1 [L,QSA]How to avoid this problem?Can someone help me?


There is/are some bad rewrites in your .htaccess.

2019年04月19日32分19秒

What's the problem exactly?

2019年04月19日32分19秒

My htaccess code is :RewriteCond %{REQUEST_URI} ^/(\w+)/?$ [NC] RewriteRule ^ profile.php?username=%1 [L,QSA].. anything wrong?

2019年04月18日32分19秒

David : Ma problem is mysite.com///myname , it shows profile page even it has more than one slash after domain.... But i dont want to show profile page in this situation..

2019年04月18日32分19秒

Its not working :(

2019年04月18日32分19秒

Hmm I posted that after properly testing it. Can you post your full .htaccess in your question (not in comments).

2019年04月18日32分19秒

ohh sry.. it was working....

2019年04月18日32分19秒

Its not working for me..

2019年04月18日32分19秒

You should add this before your other RewriteConds. If doing that doesn't work, I'm out of explanations since either anubhava's answer or my answer should work just fine.

2019年04月18日32分19秒