Anyone good at redirect :P

x4rl

Well-known member
I need to redirect root xenforo to sub-domain (apache)
from
Animelon.com
to
forums.animelon.com

Cheers
 
Ok ive tryed

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{SCRIPT_FILENAME} !index\.php$
RewriteRule ^(.*)$ http://forums.animelon.com [L,R]

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} animelon\.com [NC]
RewriteCond %{REQUEST_URI} !^index\.php$
RewriteRule ^(.*)$ http://forums.animelon.com/$1 [R=301,L]

All without any luck :C if anyone has more idea's that would be great.
Cheers
 
I guess code are fine.
Maybe you can try this code:

Code:
# send visitors to a subdomain
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^forums\.animelon\.com$ [NC]
RewriteRule ^/(.*)$ http://forums.animelon.com/$1 [L,R=301]
 
I guess code are fine.
Maybe you can try this code:

Code:
# send visitors to a subdomain
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^forums\.animelon\.com$ [NC]
RewriteRule ^/(.*)$ http://forums.animelon.com/$1 [L,R=301]
Yea same didn't work thanks tho for trying.
 
can you send me your .htaccess file?
via PM if you want

That's it without any redirect in it

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ proxy.php [NC,L]
 
mmmh, I don't know which way to turn :(
maybe you can change with the path

Code:
RewriteRule ^(.*)$ /var/www/animelon.com/forums/%1$1
I got this reply from stackoverflow (asked there also)

Definitely: the last RewriteRule (RewriteRule ^.*$ proxy.php [NC,L]) gives no chance to anything: it tells to rewrite all addresses to proxy.php. If disabling the RewriteEngine at first line changes nothing, try renaming the .htaccess file: it means there's something interfering, e.g.: another .htaccess file, the main server config, or even that your .htaccess files are not parsed by the server (which, I noticed, is not Apache but cloudflare-nginx). AFAIK only Apache parses .htaccess files

Guess I'll have to play with it some more thanks tho Lu Jia
 
Top Bottom