Page 1 of 1
Hide url parameter
Posted: Sun Jun 18, 2023 8:38 am
by amir2314
Hi dear pablo.
.
I used link prameter for some of my links
.
For example :
Home.php?Agdjdkd=true
.
But i wanna to hide the
?Agdjdkd=true after .php in the browser
.
How can i do it ?
Re: Hide url parameter
Posted: Sun Jun 18, 2023 9:25 am
by Pablo
I don't think you can hide parameters, because how else will the browser know what the parameters are?
Re: Hide url parameter
Posted: Sun Jun 18, 2023 9:55 am
by amir2314
Pablo wrote: ↑Sun Jun 18, 2023 9:25 am
I don't think you can hide parameters, because how else will the browser know what the parameters are?
I read a article called hiatory replace javascript .
But i cant undrestand how can i implent it with custome html
Re: Hide url parameter
Posted: Sun Jun 18, 2023 10:33 am
by wwonderfull
amir2314 wrote: ↑Sun Jun 18, 2023 9:55 am
Pablo wrote: ↑Sun Jun 18, 2023 9:25 am
I don't think you can hide parameters, because how else will the browser know what the parameters are?
I read a article called hiatory replace javascript .
But i cant undrestand how can i implent it with custome html
can you give the link where you read it from. I think it can be only done using htaccess.
Re: Hide url parameter
Posted: Mon Jun 19, 2023 4:26 am
by amir2314
wwonderfull wrote: ↑Sun Jun 18, 2023 10:33 am
amir2314 wrote: ↑Sun Jun 18, 2023 9:55 am
Pablo wrote: ↑Sun Jun 18, 2023 9:25 am
I don't think you can hide parameters, because how else will the browser know what the parameters are?
I read a article called hiatory replace javascript .
But i cant undrestand how can i implent it with custome html
can you give the link where you read it from. I think it can be only done using htaccess.
Hi man . Here is the link
.
https://gist.github.com/ScottKaye/5158488
Re: Hide url parameter
Posted: Mon Jun 19, 2023 4:34 am
by wwonderfull
I am not fully sure but try this in htaccess and let me know if it worked
Code: Select all
RewriteEngine On
RewriteCond %{QUERY_STRING} ^Agdjdkd=true$
RewriteRule ^(.*)$ /$1? [L,R=301]