Questions tagged as 'redirecionamento'

2
answers

Redirect: Location vs Refresh

When you use Location and Refresh to redirect. header( "Location: www.dominio.com" , TRUE , 302 ) header( "Refresh:5; url=www.dominio.com" , TRUE , 302 ) Both options produce the same result: redirection . The difference is tha...
asked by 09.09.2014 / 04:13
2
answers

What is and what is "2 & 1" for?

When we want to direct the output in order to execute a command without receiving any information, between which potential execution errors we use: meuComando >/dev/null 2>&1 Effectively with >/dev/null we are sending th...
asked by 25.03.2015 / 19:55
1
answer

503 Forwarding on multiple URLs except for one

How to make a redirect 503 (maintenance code) on every site, but leave only one URL that can be accessed? Server: Linux (Apache) with PHP 5.5 and MySQL.     
asked by 15.04.2014 / 18:38
2
answers

What is the difference between 301 and 302 redirection?

I would like to know the difference between these two types of redirection code: 301 and 302. I noticed that they are called in the Google Webmaster Tools of Permanent redirect and Temporary redirect , respectively 301 and 302...
asked by 17.01.2017 / 20:10
1
answer

Block direct access to a page

Good afternoon, I'm developing a PHP site in which there is a login screen, which redirects to the admin screen, but if I try to access the admin screen directly through the url, it opens normally. I'd like to block this direct access through...
asked by 07.10.2015 / 19:17
1
answer

Redirect all pages to HTTPS minus one in particular

I have the following code in .htaccses to redirect the whole site to HTTPS : RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://meudominio.com/$1 [R,L] However, I would like to leave a page out of this r...
asked by 20.12.2014 / 11:51
1
answer

How to get the correct HTTP status?

I tried to get the error "status" like this: error_page 403 /error.php; error_page 404 /error.php; But $_SERVER['REDIRECT_STATUS'] return 200 , already in Apache it returns 404 (the expected result). How can I define...
asked by 04.05.2015 / 04:06
2
answers

How do I create local domains to test my sites and applications?

For my tests, I'd like to create a redirection of any domain to localhost:porta on a local computer under Windows. I thought it would be possible for the hosts file in C:\Windows\System32\drivers\etc\hosts doing something like:...
asked by 10.12.2016 / 16:19
3
answers

Pagseguro does not redirect client after payment

After the payment, the client should be redirected to the thank-you page that I set up, but that's not what happens. I've got an API, I just needed to set up 2 files, they are: PaymentPagseguro.php and PagSeguroConfig.php . Th...
asked by 30.03.2015 / 02:22
2
answers

open new window php

On the site I have several banner ads. When I click on a banner, I'm redirected to a page that counts clicks on the banner. After this count I'm redirected to the page before the click on the banner and a new tab with the banner link opens. For...
asked by 11.08.2014 / 12:30