helllpppp *parked domain/redirect issue*

0xym0r0n

Well-known member
I talked to my host and they said it was my script for the forum that's forcing all my redirected domains or parked domains to keep going back to /index.php. I want some to point to specific forums or folders! Not working!

I've never had this sort of issue before and I've never been much with htaccess :\

The only time I modified it was to remove www. while browsing because it was forcing my users to log out for some reason!

Code:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>
 
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
 
<IfModule mod_rewrite.c>
    RewriteEngine On
 
RewriteCond %{HTTP_HOST} !^DOMAIN\.us$
RewriteRule ^(.*)$ http://DOMAIN.us/$1 [R=301,L]
 
    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /
 
    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
 
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
RewriteCond %{HTTP_HOST} ^domainA\.us$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domainA\.us$
RewriteRule ^/?$ "http\:\/\/DOMAIN\.us\/forums\/31\/" [R=301,L]
 
RewriteCond %{HTTP_HOST} ^domainb\-v\.us$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domainb\-v\.us$
RewriteRule ^/?$ "http\:\/\/DOMAIN\.us\/forums\/33\/" [R=301,L]
 
The rules after </IfModule> are useless. They will not execute. They need to be higher, under RewriteEngine On.

And that first block of domain rules should be changed:

Code:
RewriteCond %{HTTP_HOST} !^DOMAIN\.us$
RewriteRule ^(.*)$ http://DOMAIN.us/$1 [R=301,L]

That will match all URLs that are not DOMAIN.us which means parked domains will get redirected. I suggest changing it to this:

Code:
RewriteCond %{HTTP_HOST} ^www\.DOMAIN\.us$
RewriteRule ^(.*)$ http://DOMAIN.us/$1 [R=301,L]

That will specifically change www.DOMAIN.us to DOMAIN.us
 
Top Bottom