.htaccess domain open from subfolder then rewriterule

Viewed 125

I'm trying to make the domain getvene.com open in the subfolder main. This works fine. But then I need getvene.com/s/blabla to be seen as /?secret-code=blabla. The RewriteRule can be seen at the bottom. Separately, these rules work fine. But together, the secret code rule has no effect. What needs to be changed?

RewriteEngine on

# --- BEGIN domain redirect ---
RewriteCond %{THE_REQUEST} \ /+main/
RewriteRule ^main/(.*)$ http://getvene.com/$1 [L,R=301]

RewriteCond %{THE_REQUEST} \ /+app/
RewriteRule ^app/(.*)$ http://app.getvene.com/$1 [L,R=301]

RewriteRule ^(main|app)/ - [L]

RewriteCond %{HTTP_HOST} ^(www\.)?getvene\.com$ [NC]
RewriteRule ^(.*)$ /main/$1 [L]

RewriteCond %{HTTP_HOST} ^(www\.)?app\.getvene\.com$ [NC]
RewriteRule ^(.*)$ /app/$1 [L]
# --- END domain redirect ---

# --- BEGIN Secret Code redirect ---
RewriteRule ^s/(.*) /?secret-code=$1 [L]
# --- END Secret Code redirect ---
1 Answers
Related