Hey all,
I'm running a MediaWiki install, for which I recently switched from an addon domain (cpanel) to a parked domain, because that was cheaper and with .htaccess I could still redirect everything. This works for several domains, including this one, but now another error occurs.
When parking the domain I redirect it to /public_html/, in which I have the following .htaccess rules:
RewriteCond %{HTTP_HOST} ^(.*\.)?thedomain.com$
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.thedomain.com/$1 [R=301]
RewriteCond %{HTTP_HOST} ^www.thedomain.com$
RewriteRule ^(.*)$ thedomain.com/$1 [L]
thus enforcing a www and then redirecting it to the thedomain.com/ folder on my server
as stated before, this all works just as well as an addon slot, so I want to keep it this way.
In the thedomain.com/ folder I have the following rules:
#main page
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /wiki/Main_Page [R,L]
The goal of this rule is to redirect everyone that goes to www.thedomain.com directly to the wiki's main page. This always used to work, but since I used the .htaccess as described above (for the parked domain) I just get a list of my files in the thedomain.com/ folder.. Why isn't this rule redirecting to the correct page?
When I manually type in www.thedomain.com/wiki/Main_Page it works, indicating that the problem shouldn't be in the first .htaccess but in the second.