0

I have been having trouble with my .htaccess file. Below you can see what I'm trying to do

  • Redirect All Incoming Traffic to http://hyperthunder.net/
  • Disable viewing .htaccess file
  • Disable Listing Directories
  • Custom Error Pages

The domains I own on this web host

  • hyperthunder.net
  • hyperthunder.com

And now finally my .htaccess file

//
//Domains
//hyperthunder.net
//hyperthunder.com
//Both domains are on the same webhosting
//

//
//Redirect
// http://www.hyperthunder.net/ ---> http://hyperthunder.net/
// http://hyperthunder.com/ ---> http://hyperthunder.net/
// http://www.hyperthunder.com,/ ---> http://hyperthunder.net/
//
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.hyperthunder.net[nc]
RewriteCond %{HTTP_HOST} ^hyperthunder.com[nc]
RewriteCond %{HTTP_HOST} ^www.hyperthunder.com
RewriteRule ^(.*)$ http://hyperthunder.net/$1 [r=301,nc]

//
//Custom Errors
//
ErrorDocument 400 /customerrors/400.html
ErrorDocument 401 /customerrors/401.html
ErrorDocument 403 /customerrors/403.html
ErrorDocument 404 /customerrors/404.html
ErrorDocument 500 /customerrors/500.html

//
//Prevent viewing of .htaccess file
//
<Files .htaccess>
order allow,deny
deny from all
</Files>

//
//Prevent Directory listing
//
Options All -Indexes 

I can't figure out what is wrong. I am able to view the homepage but if I attempt hyperthunder.net/index.html it will return error 500 even for the .com domain.

halfer
  • 19,824
  • 17
  • 99
  • 186
Josef B
  • 1
  • 1
  • UPDATE: I think my webhost just now updated Homepage is now showing error 500 as well – Josef B Nov 17 '16 at 19:06
  • `Invalid command '//'`. Lines that begin with the hash character "#" are considered comments. – Dusan Bajic Nov 17 '16 at 20:07
  • Solved my own problem http://stackoverflow.com/questions/17365397/redirect-multiple-domains-to-one-domain-with-or-without-www-before – Josef B Nov 17 '16 at 20:27

1 Answers1

0

(Posted on behalf of the OP).

Found a fix!

Redirect multiple domains to one domain (with or without www before)

Community
  • 1
  • 1
halfer
  • 19,824
  • 17
  • 99
  • 186