Weird RewriteRule in site purchased via Flippa

7 replies
Hi Guys,

We just purchased a site from flippa, and are in the process of setting it up on our own servers.

At the bottom of the .htaccess file we have:

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.directoryofglendale\.com)(:80)? [NC]
RewriteRule ^(.*) http://directoryofglendale.com/$1 [R=301,L]
order deny,allow


Now the URL in the above command is NOT for our site, nor is it the domain which we purchased along with the site.

Currently the site is showing an internal server error, so just trouble shooting some files etc, but had a feeling that the above was a little odd??

Can anyone advise?

Thanks in advance guys
#flippa #purchased #rewriterule #site #weird
  • Profile picture of the author SJL
    Originally Posted by Gman101 View Post

    <Files ~ "^.(htaccess|htpasswd)$">
    deny from all
    </Files>
    That makes your site little safer from hackers.
    Originally Posted by Gman101 View Post

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www.directoryofglendale.com)(:80)? [NC]
    RewriteRule ^(.*) http://directoryofglendale.com/$1 [R=301,L]
    order deny,allow
    Someone forgot that there. It basicly says that if the domain is "www.directoryofglendale.com" then redirect to "directoryofglendale.com". (including folders and whatnot)
    Shouldn't be what's breaking your site, but remove anyway.
    {{ DiscussionBoard.errors[9022710].message }}
  • Profile picture of the author Gman101
    Thanks, appreciate the help. Was wondering if this would indicate that the site files where obtained from the site mentioned in that URL, all by dubious methods..
    {{ DiscussionBoard.errors[9023453].message }}
  • Profile picture of the author SJL
    It's possible, but he/she might also have owned both sites at some point.
    {{ DiscussionBoard.errors[9023609].message }}
  • Profile picture of the author K Meier
    I fully agree, the code in question is not harmful to your website, it's a normal www to non-www redirect, almost all website have that. It simply looks as if that code was transferred from one website to another and the previous developer forgot to update the domain name.
    Most importantly though, it can't hurt your website. You can also remove it to avoid possible error logs.
    {{ DiscussionBoard.errors[9026478].message }}
  • Profile picture of the author shahriyar
    Originally Posted by Gman101 View Post

    Currently the site is showing an internal server error, so just trouble shooting some files etc, but had a feeling that the above was a little odd??
    "internal server error" can be caused by unsupported or incorrectly formed htaccess directives, but that code is not the cause as others have mentioned.

    To debug the issue, you can cut out parts of the htaccess code, save it and try refreshing the site and see if it opens correctly. Repeat this to pin point the error, this is best done via FTP (e.g. use Filezilla).
    {{ DiscussionBoard.errors[9030858].message }}
  • Profile picture of the author David Beroff
    Of course, you'll get more information about the server error by looking at the server log. Ask your host if you're not sure where to find this.
    Signature
    Put MY voice on YOUR video: AwesomeAmericanAudio.com
    {{ DiscussionBoard.errors[9032041].message }}

Trending Topics