.htaccess help needed

I have a website under construction and in the meantime I’m using this
[SPOILER=“.htaccess”]

[CODE]RewriteEngine on
RewriteCond %{REQUEST_URI} !^/welcome.php$
RewriteCond %{REQUEST_URI} !^/welcome
RewriteCond %{REQUEST_URI} !^/emails.php$

RewriteCond %{REQUEST_URI} !.(gif|jpe?g|png|css|js)$
RewriteRule .* /welcome/index.php [L,R=302]
[/CODE]
[/SPOILER]
to redirect all traffic to coming soon page undisclosed.com/welcome (welcome is folder )
The urls look like undisclosed.com/welcome/index.php?promo=REFCODE
How do I change them to undisclosed.com/welcome/promo=REFCODE
Nimepitia stackoverflow sisaidiki
cc. @TerribleWaste

I am not sure I get whether this is an HTACCES problem or handling requests in index.php proble.

You will need to redirect ALL request that don’t request a file or folder to index.php then break down your request URL in the index file and handle the parameters.

undisclosed.com/welcome/index.php?promo=REFCODE

and

undisclosed.com/welcome/?promo=REFCODE

should work exactly the same way.

In order to remove the ? you need to handle that in your index.php/controller/etc

1 Like

i think the easiest way nikucreate. Index file… Then put a php code to redirect you to the coming soon page…

<?php Header ('location: undisclosed.com/welcome/'); ?>
1 Like