We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

a question about .htaccess | Forum

Topic location: Forum home » Support » General Questions
Onur
Onur Jan 6
hello, i want to remove or don't show  back-uri=messages page



/sign-in?back-uri=messages page


Redirect /sign-in?back-uri=messages https://www.ilkok.com


i added this code but it is only working when i sing in. for guest it is not redirecting url why?


or how can i block to access /sign-in?back-uri=messages page?  


Chris_W
Chris_W Jan 7
Try this:


<IfModule mod_rewrite.c>

RewriteEngine On

Redirect 301 /sign-in?back-uri=messages /index

</IfModule>


or


RewriteCond %{QUERY_STRING} (^|&)back-uri=messages($|&)

RewriteRule ^sign-in$ /index?&%{QUERY_STRING}

The Forum post is edited by Chris_W Jan 7
Onur
Onur Jan 7

Quote from Chris_W Try this:


<IfModule mod_rewrite.c>

RewriteEngine On

Redirect 301 /sign-in?back-uri=messages /index

</IfModule>


or


RewriteCond %{QUERY_STRING} (^|&)back-uri=messages($|&)

RewriteRule ^sign-in$ /index?&%{QUERY_STRING}

thank you a lot <3 
Chris_W
Chris_W Jan 7
If they do not work, try this.


RewriteCond %{HTTP_HOST}  ^www\.ilkok\.com$ [NC]

RewriteCond %{QUERY_STRING}  ^back-uri=messages(&.*)?$ [NC]

RewriteCond %{HTTPS} =on

RewriteRule ^sign-in$ https://www.ilkok.com/?%1 [R=301,NE,NC,L]

The Forum post is edited by Chris_W Jan 7