Welcome to WebmasterWorld Guest from 54.196.232.162

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

htaccess and website url redirect

Code for website url redirect in htaccess

     
12:06 pm on May 8, 2013 (gmt 0)

New User

joined:May 8, 2013
posts: 2
votes: 0


is there any code to redirect urls with parameters like ?id=1, ?id=2, .. to the one without a parameter

For example,
http://www.example.com/services.php?id=1 to http://www.example.com/services.php
12:31 pm on May 8, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10543
votes: 8


welcome to WebmasterWorld, Website For Business!


it depends on exactly what you are trying to do.
do you want the redirect to drop all query strings for all requests of services.php or is there more detail to your requirements?
6:39 pm on May 8, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12709
votes: 244


is there any code to redirect urls with parameters

Yes, there is. It's one of the Top Ten questions asked in this forum. Feed your question into Search and you should get several hundred answers :)

Based on your example, you simply want to look for a request that has a parameter and redirect to the identical request without parameters. Definitely several hundred answers.
3:44 am on May 9, 2013 (gmt 0)

New User

joined:May 8, 2013
posts: 2
votes: 0


yes, i want the redirect to drop all query strings for all requests of services.php
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members