I've got a index.php during my primary domain root
And ive moved my forums that was within the same "root" to some subdomain
I have to Redirect everything except the index.php
ive tryed lots of ways and none appear to operate
Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond % !index.php$ RewriteRule ^(.*)$ http://forums.domain.com [L,R] RewriteEngine On RewriteCond % animelon.com [NC] RewriteCond % !^index.php$ RewriteRule ^(.*)$ http://forums.domain.com/$1 [R=301,L]
If anybody has any ideas that might be great for the above mentioned codes I'd them searching about. Cheers
You can utilize RedirectMatch rather than spinning, that's, replace all of the rewrite block you're showing with:
RedirectMatch ^(/(?!index.php).*) http://forums.domain.com$1
You can observe the entire explanation from the regex on Regexr here. In brief, it transmits all of the URIs NOT starting with
/index.php to forums.domain.com.
If you do not need every other rewrite rule, you are able to switch off spinning by getting rid of all of the lines starting with "Rewrite" out of your .htaccess.