redirect

Curious redirection problem using location.href

I face a curious problem with redirection... Look at this small example: it works only if I add the alert() call after the redirection sentence! If I remove the alert() it does not work anymore!!! Any idea why (I'm using Firefox 3)? Thanks. <html> <script type="text/javascript"> function GotoPage() { location.href = "htt...

PHP Redirect one page to another server without showing URL

Having just written the title for this question I am aware of how dodgy it sounds! I am writing a back end for storing volunteer information for some friends, they have their own website to which I can add a volunteer.php page. What I want is for that page to redirect to a page on my server showing the form for the users to fill in, I ...

PHP header location-redirect doesn't work - why?

Hi guys, Here's my file. I want to make it redirect, but nothing happens. To check out what is going on, I added an echo before the header part. It neither throws an error or redirect to index.php. What is wrong? I have turned output buffering on/off, but nothing makes it redirect. What can I do? <? error_reporting(E_ALL); echo 'Thi...

Seam conversation ending suddenly when using Redirect

Hi all, Because I get some errors on conversations ending abruptly, I created in my project some test pages that reproduce the issue. The navigation takes place between pageA.xhtml and pageB.xhtml. Please tell me if I am using something in the wrong way. My configuration: Seam 2.2.0.GA WebLogic 10.3.2 (11g) Richfaces 3.3.2 JSF 1.2 Not...

Redirect to a different web application with associated data

I'm building a solution where 2 applications are involved. One of them handles the login and user management, and and other provides the service itself. I need a way to send the user from the first app to the second, along with some data that derives from the whole login process. The data has to be sent in such a way that it can't be ta...

How do I create a redirect from a subdirectory to the root domain?

I am trying to redirect all requests to domain.com/drupal to domain.com, including all sub directories in /drupal. I have seen several answers telling me how to accomplish the opposite of this with .htaccess, but nothing to go this way. I have tried the following line in .htaccess- RewriteRule /drupal/* ^/(.*) as well as several var...

setting up 301 redirects: dynamic urls to static urls

We are currently using a template-based website and are hoping to move to a site with static urls. Our domain will stay the same. I understand that using 301 redirects in a .htaccess file is the preferred method -- and the one that has the highest chance of preserving our google rankings. I am still new at all this and am having a ha...

.htaccess Subfolder Redirect

Hey Guys & Gals, I recently moved my WordPress website to a subfolder. I want to add a redirect in the .htaccess file so that the links to images I've uploaded originally to ~/wp-content/uploads/ will pass to ~/blog/wp-content/uploads. The .htaccess file must remain in the root folder for WordPress to read it properly. This is what I tr...

Redirect a custom url with a webservice? Other options?

I have a home server running at home and I want to grant family members access to certain private websites. Reese with password 1234 should type in his url like this: http://www.my.my/reese1234 and get redirected to where I want him to be redirected to. Can I use a webservice for this? If yes, how do I start? (I use ASP.NET and C#) Or ...

How to redirect by throwing an exceptions from an Asp.NET controller?

My controllers all extend a basic UserAwareController class, that exposes GetCurrentUser() method. I would like any call to this method to redirect to the login page if the user is not already logged in. Can I accomplish this by throwing some exception from this method? How can I cause a redirect to happen when this exception is thrown?...

Help with authorization and redirection decorator in python (pylons)

I'm trying to write a simple decorator to check the authentication of a user, and to redirect to the login page if s/he is not authenticated: def authenticate(f): try: if user['authenticated'] is True: return f except: redirect_to(controller='login', action='index') class IndexController(BaseControll...

Prevent comment form re-submission

I'm got a comment form for an article and i'd to prevent re-submission. I notice that Worpdress handles this very well (going back doesn't cause the browser to request a form re-submission), but I can't figure out how they do it, even though our methods are very similar. My Script User visits mydomain.com/article/1/article_title.html ...

Knowing redirected URL with PHP and JS

A URL redirects to another link. How do I know which link it gets redirected to with PHP and JS? And is finding the filesize of the new link possible too, without complete transfer of the file? Thanks in advance. ...

Redirects in RoR: Which one to use out of redirect_to and head :moved_permanently?

Hello, we are making a website that takes a generated incoming link and forwards the user who is clicking on it to another website while saving a record of the action in our DB. I guess it's basically what ad-services like AdSense do. However, what is the best way to redirect the user? I think html-meta-tag-redirects are out of questi...

Can I redirect to a PHP page from a Perl CGI script?

I am working with a site that uses an outside source to work with payment transactions, one of the prerequisites is that on success a CGI script is called. What I am wanting to know is it possible to do a redirect to a PHP page with the CGI script and have the PHP detect that it has been loaded via a Perl redirect, I currently have this...

HttpHandler help please

I want to write an HttpHandler to redirect traffic to various webpages on the server. The user will type in http://www.thisissupposedtoberedirected.com/site12 and should be redirected to the appropiate site, in this example site version 1.2 I know how to program in ASP.NET and C# but I don't seem to grab the finer detail about website m...

Properly 301 redirect an URL with parameters to a different site

Right now I have an outdated URL that is getting 404'd: http://mysite.com/category/?tag=blue-example It needs to be redirected to: http://subdomain.mysite.com/blue/ This doesn't work: Redirect 301 /category/?tag=blue-example http://subdomain.mysite.com/blue/ How do I properly rewrite this URL? ...

Mod Rewrite: I want to redirect all requests to index page unless the file exists (but not if the file is a php file)

I have a .htaccess file like this right now. It sends everyone to the index page unless you wanted a real file. This is sort of what I want, but I dont want anyone to be able to access a .php file. So this is what I have: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteRule ^(.*) /index.php [NC] But this is what I wan...

Redirect url to # (anchor)

I have a site that I just converted to use anchor navigation.. hwww.site.com/shows is now www.site.com/#shows It loads the info from the /shows directory to a div and adds the hash tag to tell you where you are. The problem is, if you go to www.site.com/shows, the content is still there, but unstyled. How can I get it to redirect wit...

How to redirect multiple folders to the reflecting subdomain with .htaccess

Hi, i tried redirecting some folders to the subdomains with the same names as the folders. I tried this way but it didn't work: RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(test1|test2)(.*?)$ http://$1.domain.com$2 [R=301,L] I guess the problem is that the alternation of folders doesn't return a result that i can get ...