Making a redirect

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
Warmango
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Apr 02, 2018 10:06 am

Mon Apr 02, 2018 10:46 am

So, basically heres what i want,

I want the PHP file to redirect to an HTML file by default, like so
/index.php
--> /web/index.html

But i would also like it to have a variable where i can go to
-->/dev/index.php
when i add a "?dev" to the end of the url/ip address,

i would like it to function much like this page here, where when you go to the main page, it shows a splash screen (in my case, that would be /web/index.html), but when i add something like "?webdev2" to the end, it takes me somewhere else

the page i a talking about is
0ac.me
0ac.me?webdev2

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 687
Joined: Mon Feb 22, 2016 5:52 pm

Mon Apr 02, 2018 12:16 pm

Be careful what you wish for, it's a very unsafe practice so don't do it, create a login method.

Warmango
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Apr 02, 2018 10:06 am

Mon Apr 02, 2018 12:44 pm

I figured it is unsafe, which is why the Editor that the ?dev would lead to, has a login built in,

Post Reply