All Questions

7451
votes
60answers
4451939 views

How to redirect to another webpage?

How can I redirect the user from one page to another using jQuery or pure JavaScript?
878
votes
25answers
1900076 views

How to make a redirect in PHP?

Is it possible to redirect a user to a different page through the use of PHP? Say the user goes to www.example.com/page.php and I want to redirect them to www.example.com/index.php, how would I do so...
1116
votes
29answers
673952 views

How to manage a redirect request after a jQuery Ajax call

I'm using $.post() to call a servlet using Ajax and then using the resulting HTML fragment to replace a div element in the user's current page. However, if the session times out, the server sends a re...
41
votes
1answers
32810 views

How to navigate in JSF? How to make URL reflect current page (and not previous one)

I am currently learning JSF and was rather amazed and puzzled when I realized that whenever we use <h:form>, the standard behavior of JSF is to always show me the URL of the previous page in the...
1595
votes
15answers
790129 views

In the shell, what does " 2>&1 " mean?

In a Unix shell, if I want to combine stderr and stdout into the stdout stream for further manipulation, I can append the following on the end of my command: 2>&1 So, if I want to use "head"...
192
votes
10answers
372008 views

htaccess redirect to https://www

I have the following htaccess code: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond !{HTTPS} off RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HO...
197
votes
18answers
369408 views

How to redirect all HTTP requests to HTTPS

I'm trying to redirect all insecure HTTP requests on my site (e.g. http://www.example.com) to HTTPS (https://www.example.com). I'm using PHP btw. Can I do this in .htaccess?
1044
votes
6answers
514378 views

How can I redirect and append both stdout and stderr to a file with Bash?

To redirect stdout to a truncated file in Bash, I know to use: cmd > file.txt To redirect stdout in Bash, appending to a file, I know to use: cmd >> file.txt To redirect both stdout and...
90
votes
7answers
104082 views

RequestDispatcher.forward() vs HttpServletResponse.sendRedirect()

What is the conceptual difference between forward() and sendRedirect()?
204
votes
17answers
410567 views

.htaccess rewrite to redirect root URL to subdirectory

Trying to get www.example.com to go directly to www.example.com/store I have tried multiple bits of code and none work. What I've tried: Options +FollowSymlinks RewriteEngine on RewriteCond %...

Previous Next