redirect

redirect all pages (website) to a folder within the same domain..

Hi guys, can anyone of you tell me whatever should I use so that I can redirect all of my pages (entire website) from root/folder1/* to root/folder1/folder2/* Also along with this I would like to redirect all the pages from root/folder3/* to root/folder1/folder2/* please give the code(s) to be written in .htaccess and also also where t...

Url redirect after click and downloading a file

Hi; My goal is to redirect or refresh my page while downloding excel file : Details : In my application i am sending dynamically generated excel file setContentType("application/vnd.ms-excel; charset=windows-1254"); setCharacterEncoding(Constants.ENCODING); setHeader("content-disposition", "attachment;filename=" + Constants.DEFAULT_...

How can I redirect from one SSL domain to the one with the correct common name?

Hello, all. I've got two domains set up under apache on a single server (Linux). I have an SSL certificate set up with a common name for the first domain (a.com), but not one for the second (b.com). When I try to visit https: // www. b.com, it merely takes me to https: // www a.com but maintains the same URL. Because of this, I am ge...

wait till code executes before running redirect

I have a page redirect that runs after a string is written to an MSword doc using WebClient and StringBuilder. HttpContext.Current.Response.Write(strHTMLContent); this.Page.Response.Redirect("http://www.google.com"); HttpContext.Current.Response.End(); However the string never gets written (or it doesn't get th...

Htaccess RewriteRule trouble - How to redirect to a "re-written" url on the server?

I have the following rewrite rule which is working fine: RewriteRule ^([a-zA-Z\-]+)[/]?$ apply/?survey_folder=$1 which turns this: address.com/folder1/ into this: address.com/apply/?survey_folder=folder1 The problem is that I can't figure out a way to use a redirect to the rewritten URL. Using cfml as an example, (cflocation url="htt...

ASP.NET Problem with Redirects

I have a login page which has two options "login as guest" , "login". Each click event will take the user to the same page. However, if login as guest is clicked then i want to be able to change what info is displayed on the page the user is being redirected to. I do not want to use a session variable. Any thoughts on how to do this?...

Is it possible to force Facebook Likes to follow 301 redirects

We have a large number of old Urls with FB likes that redirect (301) to new Urls. Is there a way to get FB to recognize the 301s and migrate or move the likes to the new Url? ...

ASP.NET HTTP to HTTPS redirect with www prefix

I am using this simple code to redirect http to https on my billing landing page: if (!Request.IsSecureConnection) { // send user to SSL string serverName =HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]); string filePath = Request.FilePath; Response.Redirect("https://" + serverName + filePath); } ...

301 Redirect called from Flash crashes Internet Explorer

I have Flash game at my site. There is a button "Download full version" that calls Javascript function: function download() { window.open('http://mysite.com/goto/game1'); } http://mysite.com/goto/game1 redirects via 301 redirect in .htaccess to http://mystatisticsite.com/goto/mysite/game1 redirects via PHP header('Location: '.$do...

ASP.NET Response.Redirect Hangs Server

This is related to this question but I've got specific information now. I've got a problem where my site won't load for a second visitor if the page is running a report for the first visitor. This is what happens. User 1 comes to the site User 1 runs a report that takes 30 seconds. User 2 comes to the site User 2 waits until user 1 re...

redirect an internal IP from HTTP to HTTPS with Apache

Hey all- I have looked this up on here and Google but none of the suggestions seem to be working for me. I'm working on an internal site at this point so the endpoints are IPs vs URLs. Accessing the site via HTTPS works, but HTTP just says "Cannot establish a connection". I can't seem to find anything in the logs that explains why. I...

htaccess redirect according to IP

Let's say my server looks like this: /www/.htaccess /www/index.php /www/temp/index.php And my personal IP (not the server's!) is 127.0.0.1* (* ok, that's impossible, but for the sake of argument...) I would like to redirect (301/302) everyone EXCEPT that IP to /temp/index.php My current code looks like: Options +FollowSymlinks Rewr...

mod_rewrite local redirect on hostname

Hi, wonder if you can help me, I've got a hosting account (on GoDaddy for my sins) which has one domain name associated with it and a few more parked. If I visit: site1.com site2.com site3.com I get the contents of /httpdocs/ I want to redirect to a sub directory (locally) only so that if you goto site2.com, the URL stays as site2....

How can I redirect an asp.net mvc2 page

I'm looking to take data posted to a form, process it and then make a redirect to a third-party website with both GET data AND POST data. I understand that Response.Redirect() is not the way to go about this - what is though? I dont want to make the original form submit to the third party provider, I have some processing to do on thei...

php header redirect not working

Hi all, I'm using an ajax call to trigger a php redirect using headers. According to chrome's developer tools the content of the page is loaded (ie: is in the resource list), but the page never redirects. I'm not getting any error codes. Here's the php: <?php ini_set('display_errors', false); if (!isset($_SESSION)) { if($_POS...

Redirection error in Python script

Hi there! I have 2 python scripts which are main_menu.py and inputip.py. The problem occurs when I press "enter" to be redirected to main_menu.py when my function finishes in iputip.py. The script does not allow me to redirect to main_menu.py instead it shows this error on the Windows command prompt: Traceback (most recent call last): ...

Conditional login redirect in Django

I know about LOGIN_REDIRECT_URL and I know about <form action="?next={{ next|default:"/foo" }}" method="post"> in django-registration's login.html template. Here's what I want to happen: If a user logs in from the homepage, redirect them to a URL that contains their username (/lists/[username]). If a user logs in from any other pag...

.htaccess code to redirect old blog urls to new blog urls on a new domain

I'm trying to redirect an old wordpress blog to a new posterous blog using an htaccess file and I am using the code below; the problem is that I can't get the old individual blog posts to redirect to the new ones - they have the same name structure on the new domain name (eg: olddomain.com/post-1 is now newdomain.com/post-1), but if I ty...

Redirect from Web query open agent on Lotus Domino?

Doe anyone know a way of redirecting to another webpage from lotus domino web query open agent? The print statement does not seem to work. A possible workaround would be very appreciated! Something on that subject can be found here but it seem kind of flaky. http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/552ac51d...

htaccess: how to redirect every url that starts with http://site.com/shop

Like the title says, how do I redirect every url that starts with http://site.com/shop to a single page? so I have: http://site.com/shop/index http://site.com/shop/detail/52 http://site.com/shop/download .... etc, and it should be redirected to http://site.com/new_page ...