Welcome to WebmasterWorld Guest from 107.21.175.43

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

htaccess and website url redirect

Code for website url redirect in htaccess

     

Website For Business

12:06 pm on May 8, 2013 (gmt 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

phranque

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

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



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?

lucy24

6:39 pm on May 8, 2013 (gmt 0)

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



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.

Website For Business

3:44 am on May 9, 2013 (gmt 0)



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

Featured Threads

Hot Threads This Week

Hot Threads This Month