|
I need to redirect users from http://myurl.com/Login.action to http://myurl.com/app/Login.action
I tried this but I get an error saying I get too many redirects.
RedirectMatch ([A-Za-z]*)\.action$ http://myurl.com/app/$1.action
How can I get apache to...
Started by Trevor Allred on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I modified yours a bit and this is what I came... .
Try something like this:
RedirectMatch ^([^\/]+?\.action)$ http://myurl.com/app/$1
Rob, thanks for your guidance .
Your regular expression matches both urls, so you're redirecting in an infinite loop.
|
|
I'm guessing that using PHP's header("location: here.html") would be much better javascript's window.location("here.html") as far as search engine visibility goes. I would assume that the server redirect would show google the correct content and the javascript...
Started by shady on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Using PHP's.
The only way to forward on search engine rank is with an HTTP 301 (permanent) redirect.
|
|
I have a situation where some users may come to mistyped pages, from links, etc. In most situations I can determine the correct page that should be displayed, so I want to redirect to the correct URL.
Is a 301 Redirect appropriate in this case. 301 means...
Started by DisgruntledGoat on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Either use a 301 and do the redirect, or use a 404 and display a message along the lines of "I think you mean 'this URL' instead; update....
Maybe just display a 404 page and suggest some correct, I think .
You can't redirect with a 404 document.
|
Ask your Facebook Friends
|
I want to determine if using Apache's .htaccess mod rewrite is a faster way to redirect to a PHP file, compared to redirecting from one PHP file to another, using the header redirect core function of PHP.
I looked around and I was unable to find anything...
Started by thecrandallster on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at serverfault):
That by "redirect" you mean a rewrite rule which doesn't actually use the [R] flag, but instead "redirects to your visitor's browser a page-redirect header, browser sends another request, Apache processes in your PHP app if you detect....
|
|
In a functional test of my Rails app, I want to test where I am redirected to. The expected URL points to an external resource (that means it's not part of my application).
The URL looks like this: https://my.url.com/foo?bar1=xyz&bar2=123
Unfortunately...
Started by Daniel Pietzsch on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Application, why not just get the params out of it as you would normally and test that the redirect occurs faking it anyway, so I would just skip testing the redirect URL and just test for a redirect with assert_response :redirect....
|
|
I have a site running at a subdomain that has been migrated to a new server and new domain name. To preserve search credits I know a 301 redirect is the proper way to handle migrating the transition. (The marketing department speaks of 301 redirects like...
Started by johnml on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Now, I agree....
I'd stick with the HTTP 301 redirect.
For that reason I would not use a CNAME record to do a "redirect" like that.
There's only load on the server (and minuscule at that) if someone actually uses the redirect, so domains.
|
|
We have a POST to a PL/SQL database procedure that (a) does some database operations based on the POST parameters and (b) redirects the user to a page showing the results.
The problem is, when the user does a browser "refresh" of the results page, that...
Started by Jim Hudson on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The canonical solution....
For instance, with Apache HTTP Server, you need to specify the force-redirect flag in mod_rewrite: http://httpd.apache.org/docs/1.3/mod/mod.
Some platforms will internally redirect within a site.
redirect.
|
|
I have the following scenario:
I have an edit page, which can be called from different pages. These pages could be the detail view for the current entity, or the list view for the entities (with or without a search in the route).
HOW do I cleanly redirect...
Started by Erik van Brakel on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can always have a hidden form element telling the controller where to redirect when posting don't want to redirect any old site on the web; you need to ensure that the page to which you redirect.
|
|
I want to be able to redirect a domain pointed to my webhosting to an external domain.
For example, I have this in my .htaccess:
RewriteCond %{HTTP:Host} ^(?:www\.)?mydomain\.example$ RewriteRule ^(.*)$ http://myexternal.example/site [R=301,NC]
However...
Started by Ben Hall on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
<html> <head....
But a single iframe is easy anyway.
I'm not sure if framsets are supported in newer versions of HTML, but browsers still understand old versions anyway.. .
Either a single frame frameset, or an iframe with width/height set to 100% .
|
|
Hi experts! I'm implementing a URL shortener like bit.ly. For this, I have a Java servlet backend which does a response.redirect(targetURL) for every redirection request.
This works fine for HTTP requests, but I'm having a problem with file:// protocols...
Started by Raj on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The server sends html of the form
<a href="file:///N:/somefolder">click here</a>.
redirect.
|