![]() | | ||||||||
| | #1 |
| Advanced Warrior War Room Member Join Date: Jul 2006 Location: USA
Posts: 1,612
Thanks: 92
Thanked 385 Times in 116 Posts
|
Hey guys, Got a little mod rewrite question I can't quite figure out. I'm trying to setup my htaccess file so that whenever someone accesses a particular webpage that contains a query string in the URL, it will display just the part of the URL before the query string. For example, whenever this webpage is accessed... www.mywebsite.com/pageX.php?name=john ...I want it to display the following URL in the address bar... www.mywebsite.com/pageX.php I did some web research and figured out how to get mod_rewrite to hide the query strings for *all* pages on my site, but what I want is to do this for *only* 1 page on my site (pageX.php). Any ideas? |
| | |
| | |
| | #2 |
| Personal hygiene coach Join Date: Aug 2005 Location: Potemkin Village
Posts: 1,084
Thanks: 268
Thanked 377 Times in 254 Posts
|
This should do it... RewriteEngine On RewriteCond %{QUERY_STRING} . RewriteRule ^pageX.php(.*)$ http://www.YourDomain.com/pageX.php$1? [R=301,L] |
| | |
| | #3 |
| Advanced Warrior War Room Member Join Date: Jul 2006 Location: USA
Posts: 1,612
Thanks: 92
Thanked 385 Times in 116 Posts
| |
| | |
| | |
![]() |
|
| Tags |
| htaccess, mod, pros, rewrite |
| Thread Tools | |
| |
![]() |