1

I have a website allows people to create fundraising campaigns for selling t-shirts.

They have the ability to log-on, create product and then create a campaign with a deadline, etc. The plugin that makes this possible creates a url for their campaign, but it is long:

www.mylongdomainname.com/projects/NAMEOFCAMPAIGN

Obviously, I could manually create a redirect and then provide that to the client after they have created it, but I want to have something that does it automatically!

So if I owned another domain that was exclusively for the purpose of redirects, we will call it www.shortdomain.us

Is there a way (plugin, etc.) that www.shortdomain.us/NAMEOFCAMPAIGN could be automatically created once www.mylongdomainname.com/projects/NAMEOFCAMPAIGN was created?

4
  • To further clarify the final paragraph, I want the shortdomain to be created and then redirect to the longdomain. Sep 22, 2016 at 19:11
  • If you can show your research and coding efforts so far then you'll have more chance of help. How to Ask Plugin recommendations are off-topic. Sep 22, 2016 at 19:15
  • Andy- I don't even know what to call what I'm trying to do so therefore it is hard to search for the solution. That is why I have resorted to a forum like this in hopes that someone understands what I am asking/trying to do and can direct me to where I need to go. Sep 22, 2016 at 19:23
  • 1
    Searching for "URL shortener api" seems fruitful Sep 22, 2016 at 19:52

1 Answer 1

0

It's not a WordPress problem, but....

You can use something like bit.ly or you just set up the short domain on hosting and either redirect using mod_rewrite or using PHP's header() function.

5
  • Setting up a bit.ly is a manual process. I want an automatic solution (if there is one) Thanks. Sep 22, 2016 at 19:22
  • Please read the rest of my answer.
    – sdexp
    Sep 22, 2016 at 19:23
  • Sorry. I will look into this. Sep 22, 2016 at 20:33
  • Sdexp- YOU DA MAN!!!! Sep 23, 2016 at 2:25
  • Bitly even has a WP plugin! Sep 23, 2016 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.