Most voted "redirecting" questions
Response given by a web server that sends the browser (user agent) to a resource/address other than the requested one.
Learn more…125 questions
Sort by count of
-
87
votes8
answers75484
viewsError - "Cannot Modify header information - headers already sent"
I have the following code using the function header() of PHP: header("location: painel.php?spv=nav/regMove"); exit; and when it is triggered reports the following error: Cannot Modify header…
-
17
votes2
answers14623
viewsWhat is and what is "2>&1" for?
When we want to direct the output in order to execute a command without receiving any information, among which potential execution errors we use: meuComando >/dev/null 2>&1 Effectively…
-
13
votes2
answers1560
viewsWhat is the difference between window.Location and window.location.href?
I’ve always used window.location.href to redirect to another internal page or external URL, but when using only window.location (without the .href) produces the same result, i.e., makes the same…
-
10
votes2
answers664
viewsRedirection: Location vs Refresh
When to 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:…
-
7
votes1
answer526
views503 redirect across multiple Urls with the exception of one
How to make a 503 redirect (maintenance code) throughout the site, but leave only one URL with access? Server: Linux (Apache) with PHP 5.5 and Mysql.
-
7
votes1
answer3807
viewsBlock 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 this admin screen through the url, it usually opens. I would…
-
7
votes2
answers753
viewsWhat is the difference between 301 and 302 redirects?
I would like to know the difference between these two types of redirect code: 301 and 302. I realized that they are called on Google’s Webmaster Tools Permanent redirection and Temporary…
-
6
votes1
answer692
viewsRedirect all pages to HTTPS except one in particular
I have the following code on .htaccses to redirect the entire site to HTTPS: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://meudominio.com/$1 [R,L] However I would like to…
-
6
votes1
answer468
viewsHow 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 he return 404 (the expected result).…
-
5
votes1
answer473
viewshttps Redirect Problem
I’m having a bit of a weird problem here. We have two sites on the same server running with Nginx; a holds certificate HTTPS and the other not. The problem is that if a customer enters the site…
-
5
votes2
answers15380
viewsopen new php window
On the site I have several advertising banners. When I click on a banner, I am redirected to a page that counts clicks on the banner. After this count I am redirected to the page before the banner…
-
5
votes2
answers2457
views301 redirect outside the domain with htaccess
I own a domain www.dominio1.com.br that points to the root of my site and another domain www.dominio2.com.br configured as redirector to www.dominio1.com.br/novo. However, I would like the user to…
-
5
votes3
answers3857
viewsPagseguro does not redirect customer after payment
After payment, the customer should be redirected to the thank you page I set up, but that’s not what happens. See, I took an API, I just needed to set up 2 files, among them are:…
-
5
votes1
answer1392
viewsHow to use redirect methods with Java Servlets
Hello, I have a page ordem_servico.jsp with a form that when submitted goes to Servletinsertordemservico which inserts the form data into the database. I am trying to make sure that when the data is…
-
5
votes2
answers3911
viewsHow to create local domains to test my websites and apps?
For my tests I would like to create a redirect from any domain to localhost:porta on a local computer, in Windows. I thought it would be possible by the hosts file on…
-
4
votes2
answers238
viewsRedirecting of HTTP requests
I have the following problem: I would like to redirect (through .htaccess) the urls below with temporary redirection (HTTP/1.1 302 Moved Temporarily) Examples: http://www.site.com.br/artigo/0/ for…
-
4
votes2
answers1355
viewsIs there a way to redirect to another page by clicking on a div?
I have a div: <div class="col-lg-4 col-sm-6"> //Essa aqui <section class="panel div-border-red"> <div class="symbol red"> <i class="fa fa-eye"></i> </div> <div…
-
4
votes1
answer428
viewsIs it possible to hide the redirect, but keep the link for the download?
I made a simple favlet, to facilitate the task of converting videos from Youtube audio: <a…
-
4
votes2
answers264
viewsRedirect to a URL if Javascript is disabled
Using the tag <noscript> it is possible to detect when the Javascript engine is disabled in the browser (as per this question), but how to redirect the browser, after a few seconds, to a…
-
3
votes1
answer202
viewsHow to bypass an HTTP redirect?
Is there any way to do a "bypass" and access the page? For example: if(!isset($variavel)) { header ('Location: error.php'); } else { echo 'oi'; }
-
3
votes1
answer664
viewsHow to create redirects by country?
How can I create redirects by country? I mean, suppose I get a visitor from Mexico, then you’d have to redirect to meusite.com/mx/, already if I receive a visit from Brazil go to meusite.com/br/ or…
-
3
votes2
answers418
viewsCakephp Does Not Redirect on the Online Server
Good morning! I’m using the cakephp framework, but I’m having a problem with no solution so far... I have a login controller, commented all the login code and left only the tree $this->redirect(…
-
3
votes3
answers1056
viewsRedirect "dominio.com.br" to "Subdominio.xyz.com.br"
I have a redirect/pointing problem and I believe it is some incorrect server configuration. I have a VPS (digital Ocean) running Ubuntu14 (terminal) with Apache, PHP5, Mysql. I have full access to…
-
3
votes2
answers73
viewsPHP redirection
Is there an API and/or function, in PHP, that redirects the pages of my site, depending on the location of the person ? Example : if not BR, redirect to the English page.
-
3
votes1
answer697
viewsHow do I get the final URL of a JS redirect?
I was trying to make a code to get the final url of redirecting some links, I managed to do for most of the links I needed, incoming for this I could not: https://redir.lomadee.com/v2/987163d4 All…
-
3
votes1
answer57
viewsPage redirection with error message
Good afternoon I have a doubt this command is correct? http://localhost/site/index.php#contato?info=Email%20Vazio index.php#contact? info=Email%20Vazio This is the function that sends the command…
-
2
votes1
answer243
viewsCookies for intelligent search in E-commerce
I want to do as for example on the Saraiva site: http://www.livrariasaraiva.com.br/ When doing a search (e.g., "Galaxy Backpacker’s Guide") the url is directed to a smart search url:…
-
2
votes1
answer890
viewsRedirect .com.br domain to . com
I have two domains: the main one is . com and the secondary one is .com.br I need to make sure that every time you go www.dominio.com.br it redirects to www.dominio.com, even when it has a…
-
2
votes1
answer103
viewsVirtual store domain forwarding
Good morning! I am finalizing the development of a virtual store that I will work with rent. So far so good: I have the following problem. I want to let all customers have always used the same…
redirectingasked 9 years, 6 months ago Clayton Eduardo Mergulhão 373 -
2
votes1
answer987
viewsHow to redirect to auth/login in Laravel 5.1 if visitor is not logged in?
I am using Laravel 5.1 native authentication but when accessing a protected route the system does not redirect me to the login screen, instead it shows me the message "You don’t have permission to…
-
2
votes4
answers7832
viewsRedirect problem in Wordpress
After a change in the settings of the Wordpress admin panel, it was no longer possible to access any page other than the home page, the administrative panel itself and the appearance of the site…
-
2
votes2
answers65
viewsHow to make a link on my site open only when clicked on the same page?
I’m trying to make a plugin html file editor, css, js and php, my problem comes that after it reads all the files it creates a link to edit my created file and goes to another page only I want that…
-
2
votes1
answer192
viewsSystem of real estate sites and redirection to each domain pointed
I am developing a real estate system in which when the user makes his registration he gets a basic URL to access his site. Example: foo.bar/template/1/site.php? id=73646 That is, all the files of…
-
2
votes1
answer773
viewsRedirect AJAX Cross-Domain Request in PHP
I have a code that redirects an AJAX request and it works normally on localhost, but on the hosting server cross-browser the request is not redirected. header('Location:…
-
2
votes1
answer499
viewsThis web page has a redirect loop
Well folks, after a long search on google, I found nothing similar to my problem, so I thought to report here. Yesterday a system I am building started displaying this problem "This web page has a…
-
2
votes1
answer385
viewsProblems with HTACCES url - 301 redirect does not work on a page
I did 301 redirects of some of the url’s of my site recently and started giving the image problem: My . htacces is like this: RewriteEngine On Options All -Indexes RewriteCond %{SCRIPT_FILENAME} !-f…
-
2
votes1
answer136
viewsRedirect 301 to specific urls
How do I do in htacess redirect 301 ? But in specific urls, I changed my domain, and migrated the posts for example: meusite.com.br/article/article name meusite2.com.br/article/article name Make a…
-
2
votes0
answers92
viewserr_too_many_redirects only in production environment
I have an app that pays some employees. On the screen it comes selected from the current month, not to need to select, but if you have mtos data on screen it while processing brings "The…
-
2
votes0
answers135
viewsUrl forwarding keeping the url
Personal my client has a resale plan at Locaweb where he has a main website and within this brush has the Subsites that are generated dynamically and do not have folders in the hosting. I need to…
-
1
votes1
answer818
viewsRedirect with click jQuery/Javascript
I have a home page where when clicking on a menu item, redirect to another page and a click in a given service in a "accordion/accordion". I have something like this: var index =…
-
1
votes4
answers3185
views301 https protocol redirect to http
I would like to make a 301 redirect (through .htaccess) only on 1 link I have https to http without changing any other server link or protocol. Link https:…
-
1
votes1
answer56
viewsDomain forwarding
Is there any way to redirect the domain to a folder on public_html instead of adding a file index.html with automatic redirection?
-
1
votes1
answer112
viewsRedirect URL to htaccess file
I need to make sure that when they access my site like this http://www.meusite.com.br/guarulhos redirect (or open) the page http://www.meusite.com.br/guarulhos.asp . I’m trying with htaccess…
-
1
votes1
answer1165
viewsManipulating url with javascript
I own a blog and migrated platform (Blogger -> Wordpress) and I also changed the domain. For newer articles I do not face any problem, however articles older than one or two years, there are…
-
1
votes0
answers134
viewsError 418 Wordpress, SSL Redirect and W3 plugin
I bought an SSL certificate for my blog and then went to edit the .htaccess to include 301 redirect. I received as a reply that there was being too many redirects and then I checked the file and…
-
1
votes0
answers1095
viewsHow to redirect to a js Node page?
I can do this more with a route, but I want to do something like: app.redirect(url); and not: app.get('/', function(req, res) { res.redirect(url); }); someone can help me? vlw , and obgd!…
javascript node.js redirecting express url-forwardingasked 8 years, 8 months ago Henrique.Araujo 105 -
1
votes0
answers26
viewsRedirecting to another sub-domain with added flash attributes (Redirectattributes) does not work
My question is related to adding attributes in the interface RedirectAttributes. I’m adding two attributes flash redirecting, but redirecting does not just change the URI, but the sub-domain as can…
-
1
votes0
answers56
viewsRedirect with . htaccess
I am using the following mod-rewrite rule RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/([^/]+)/?$ index.php?lang=$1&page=$2 [L,QSA,NC] But now I…
-
1
votes5
answers1390
viewsPage redirection according to access country
I have 2 PHP pages, one in Portuguese and the other in English, and I would like the user to be automatically redirected to English if the access was outside Brazil. Is there any way ? Or the most…
-
1
votes0
answers76
viewshtaccess configuration for wildcard subdomain
Please, I have a wildcard entry in my domain, that is, qualquerNome.meudomino.com.br redirects to mydomain.com.br. I need to configure my htaccess to redirect all entries to a file, in which,…