Showing posts with label redirect. Show all posts
Showing posts with label redirect. Show all posts

Monday, June 11, 2012

What is correct HTTP status code when redirecting to a login page?


When a user is not logged in and tries to access an page that requires login, what is the correct HTTP status code for a redirect to the login page?

Sunday, June 10, 2012

bash: redirect and append both stdout and stderr


To redirect stdout in bash, overwriting file




cmd > file.txt



To redirect stdout in bash, appending to file

Friday, June 8, 2012

Tuesday, June 5, 2012

Short URL system: How to redirect the Custom URLs?


I'm trying to make a tinyurl-like service for my company, and so far looks good, but now I have a problem I can't solve.

Friday, June 1, 2012

redirectmatch changes post to get


I have two separated vhost. On the www. one, I have instaled this only line on .htaccess

Thursday, May 24, 2012

Generic htaccess redirect www to non-www


I would like to redirect www.example.com to example.com.



The following htaccess code makes this happen:

How to manage a redirect request after a jQuery Ajax call


Im using $.post() to call a Servlet using Ajax and then use the resulting HTML fragment to replace a div element in the User's current page. However, if the session timeouts the server sends a redirect directive to send the user to the login page. Nonetheless, JQuery is replacing the div element with the contents of the login page, forcing the user's eyes to witness a rare scene indeed.

How can I make a redirect page in jQuery/JavaScript?


How can I redirect the user from one page to another using jQuery?

Monday, May 21, 2012

How do I use sudo to redirect output to a location I don"t have permission to write to?


I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite often needing to redirect output to a location I don't normally have write access to.

Sunday, May 20, 2012

Change the DirectoryIndex based on a domain/sub-domain in .htaccess


I have a shared hosting with one domain and one sub-domain (for mobile and clients). Each domain and sub-domains has different default index pages. The hosting company told me to put everything in my .htaccess file since I don't have access to the httpd.conf.

Friday, May 18, 2012

Thursday, May 17, 2012

.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. Please help!

Redirect "myapp.com" to "www.myapp.com" in rails without using htaccess?


Using Morph Labs' Appspace to deploy a site means no automated way to redirect 'myapp.com' to 'www.myapp.com' (and no access to .htacess).