I have build a url shortener with laravel 5. I use the redirect() helper function to redirect to the destination page. Now here is my problem:
Twitter and Google+ can't fetch the real site behind the shortlink. When I curl (linux command) a goo.gl shortlink I get a 301 redirect. When I curl my shortlinks I get a 500 internal server error but it works in the browser.
I have set the route methods to any() but it also fails.
Now it works fine. I had 2 problems. The main problem was my ViewLogger. It logs some $_SERVER variables but I didn't check if the array keys exists and one array key don't exists on a curl so it fails.
And the second problem (301) was solved by your answer.
The main problem was my ViewLogger. It logs some $_SERVER variables but I didn't check if the array keys exists and one array key don't exists on a curl so it fails.