Lunarpages Web Hosting Forum

Author Topic: 301 redirect problem  (Read 6865 times)

Offline masonbarge

  • Spacescooter Operator
  • *****
  • Posts: 36
301 redirect problem
« on: August 11, 2012, 07:04:29 AM »
Hi.  I have a VPS account using Lunarpanel (LPCP).  I have a domain listed as "".

Google and several other services tell me I do not have a 301 redirect from "" to "".

I have the following in .htaccess in my public_html folder:

Code: [Select]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^(.*)$ "http\:\/\/dailyprayer\.us\/$1" [R=301,L]

Can anyone tell me what my problem might be?  Google really doesn't life soft redirects.

"If this is coffee, please bring me some tea. If this is tea, please bring me some coffee."

                  ~ Abraham Lincoln

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6428
Re: 301 redirect problem
« Reply #1 on: August 11, 2012, 09:56:12 AM »
I can't see anything obviously wrong, if this is in the root (public_html) directory. Just for giggles, try cleaning it up a bit:
Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.dailyprayer\.us
RewriteRule ^(.*)$$1 [R=301,L]

The in the RewriteCond is a regular expression (pattern), so periods should be escaped. The replacement string in the RewriteRule is not a regular expression, so it doesn't need escapes.

I can see that when I type in, it is changing in the browser address bar to So, the current 301 is working. Why search engines are telling you it's not working, the only thing I can suggest is that they don't like your formatting of the lines (escapes in the RewriteRule) for some reason.
Visit My Site

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