homepage Welcome to WebmasterWorld Guest from 54.163.72.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
htaccess and website url redirect
Code for website url redirect in htaccess
Website For Business




msg:4571821
 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




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

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




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

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




msg:4572132
 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved