This is my current script… I need to allow “sub.domain.com/register/USER”
Currently, I have a rerwrite cond for “sub.domain.com” which points right to “sub.domain.com/login”
What am I doing wrong?
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteCond %{HTTP_HOST} ^(.+).domain.com$
RewriteRule ^register(.*) https://%1.domain.com/register$1 [L,R=302,QSA]
RewriteCond %{HTTP_HOST} ^(.+).domain.com$
RewriteRule ^$ https://%1.domain.com/login/ [L,R=302]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
As of update, I have a redirect loop in /register/USER..
Replace your first set of rules with this:
EDIT: Maybe a better solution is to rewrite only if the URI isn’t /register/user. So get rid of the above rule, and change the one below it to: