Icytrey-Richards
Icytrey-Richards

Reputation: 13

How to remove parameters from a url using .htaccess

wasted the whole day trying to hide the url parameters from a url using php but failed

sports%20betting/index.php?type=matchresult

i want to remove type=matchresult from the link could somebody help me ??

Upvotes: 0

Views: 51

Answers (1)

anubhava
anubhava

Reputation: 786359

Put this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{QUERY_STRING} .+
RewriteRule "^sports betting/index\.php$" $0? [L,NC,R=302]

Upvotes: 1

Related Questions