Web Hosting Forum | Lunarpages

Author Topic: Redirect from LunarPanel  (Read 3838 times)

Offline spacecasethebandguy

  • Newbie
  • *
  • Posts: 2
Redirect from LunarPanel
« on: February 06, 2015, 06:31:38 AM »
I have the "starter" package for my hosting. All I need this to do is redirect my domain to my facebook page. This has proved to be impossible. I've tried it through the control panel and it doesn't work. I've also tried to hand code the htaccess to get it to work. Still nothing. Here's the code:

RewriteEngine On
RewriteRule  ^(.*)$  https://www.facebook.com/pages/Spacecase/1508522466082996/$1  [R=301]


 :( Please help! I thought this would be easy. It was with the other hosting company, but I left them because the kept trying to take more of my money.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6206
Re: Redirect from LunarPanel
« Reply #1 on: February 06, 2015, 06:45:16 AM »
When you say it "doesn't work", what exactly does happen? Do you end up on a different page? Do you get any error messages?

Is this a Linux (Apache) server? If it's Windows (IIS or Windows Server), .htaccess will be ignored. There's probably some other way to redirect, in that case. Worst case, you make index.html:
Code: [Select]
<html>
<head>
  <title>Redirect to my Facebook page</title>
  <meta http-equiv="refresh" content="0; URL=https:......" />
</head>
<body>
  You should be immediately redirected to my Facebook page. If not, <a href="https:....">click here</a>.
</body>
</html>
Note that this will always go to the same place on your FB page (anything else the visitor types in will be discarded).

Is your .htaccess file in the / directory (site root)? Is it readable (644 permissions)? Is there anything else in it?

Note that using $1 will tack on anything else the visitor added to your LP URL, which may or may not be valid on FB. You can drop the /$1 if you want them to go to the same URL each time.

P.S. If this is a brand-new LP account (and domain name), remember that it can take up to 72 hours (usually much less) for the Web's Domain Name Service to get updated around the world. If your LP domain isn't being recognized yet, try back in a day.
« Last Edit: February 06, 2015, 06:49:37 AM by MrPhil »
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline spacecasethebandguy

  • Newbie
  • *
  • Posts: 2
Re: Redirect from LunarPanel
« Reply #2 on: February 06, 2015, 09:21:10 AM »
Thanks yeah, it should be apache. The error is this basically:

The server at www.spacecasetheband.com can't be found, because the DNS lookup failed. DNS is the network service that translates a website's name to its Internet address. This error is most often caused by having no connection to the Internet or a misconfigured network. It can also be caused by an unresponsive DNS server or a firewall preventing Google Chrome from accessing the network.

I've tried this from multiple ip's

So maybe just use their redirect tool and wait a couple of days? Also should the facebook address contain an https or just http, I've noticed either way it goes to the desired page.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6206
Re: Redirect from LunarPanel
« Reply #3 on: February 07, 2015, 06:38:48 AM »
It works for me -- took me straight to your FB page. If it still doesn't work for you, try clearing your browser cache. It's also possible, though unlikely at this late time, that your local DNS doesn't yet recognize your domain name.

If FB changes your http URL to https, try to use https for the redirection. That may save one round trip between the browser and server, depending on whether they use a 30x or at 20x status code on the http-to-https redirect. What may happen is that they bounce it back to the browser, saying "use this (https) URL". Then the browser has to send in the request again, wasting time.
« Last Edit: February 07, 2015, 06:40:55 AM by MrPhil »
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline mithcd

  • Intergalactic Superstar
  • *****
  • Posts: 131
Re: Redirect from LunarPanel
« Reply #4 on: February 13, 2015, 11:32:38 AM »
I think this was just DNS propagation. Remember, sometimes, it could be completed maximum 48H. I have seen this one myself and I cannot see why on some occasions it would take too long. But it would be nice to see that it worked after that time period.

 

Share |