Portal Home > Knowledgebase > Articles Database > htaccess redirect all subdomains and pages to index problem


htaccess redirect all subdomains and pages to index problem




Posted by o2arena, 01-20-2012, 04:27 PM
Hello. This might not technically be a programming issue but I did not know where else to put this. I have a typo domain where I want every single wildcard subdomain and every single page (in subdomain and in main folder) to redirect to mydomain.com/index.htm I have followed the instructions here http://www.easymodrewrite.com/example-subdomains and elsewhere, which means that: 1. I have added *.mydomain.com. to the nameserver. 2. The host has added a ServerAlias according to instructions(server runs litespeed, not apache) 3. I have added .htaccess files as shown in the example url above I have managed to get all wildcard subdomains to redirect to index.htm , but subdomain.mydomain.com/mypage.htm gives a 404, this is without .htaccess in place in the root. When I put .htaccess in place, I get a "You don't have permission to access / on this server." Any ideas on how to proceed with this? I am wondering if the issue is related to the ServerAlias or the htaccess, finding it hard to narrow it down. Appreciate of any help or ideas you can give me.

Posted by silasistefan, 02-02-2012, 02:27 AM
did you try adding this to httpd.conf: ErrorDocument 404 /index.html ?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
SMTP OUTLOOK and CSF (Views: 521)
Switching resellers (Views: 483)