Home > Enterprise >  How can i trim URLs to root domain? i'm using notepad
How can i trim URLs to root domain? i'm using notepad

Time:07-29

I have a list of domain name with parameters

http://www.anandinfra.net/project.php?id=2
http://artlinkinteriors.com/page.php?id=1
http://www.rabinmukherjeecollege.in/notice_details.php?id=1

I need to find other parts with domain and I have to replace those parts.

Finally my result should look as follows. Expected result:

http://www.anandinfra.net/
http://artlinkinteriors.com/
http://www.rabinmukherjeecollege.in/

How can I attain this result?

CodePudding user response:

Hi you can create a CNAME in the DNS setting with the http://www.anandinfra.net/project.php?id=2 pointing to http://www.anandinfra.net/

and same for the rest

CodePudding user response:

In whatever programming language you use (which you don't disclose), find the relevant library handling URLs and use it to mutate them. DO NOT attempt to do that by string manipulation.

  • Related