redirect

[PHP] cURL and redirects - returning multiple headers?

I'm writing a specialized PHP proxy and got stumped by a feature of cURL. If the following values are set: curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch, CURLOPT_HEADER, true ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); cURL correctly handles redirects, but returns ALL page headers, not just the final (no...

Redirect existing url .php to new url

How to redirect existing url to new url? Sample : I have www.a.com/help.php in google/yahoo : when visitor click this link "www.a.com/help.php" on address bar automatically change be www.a.com/help. Because in .htaccess I was rewrite www.a.com/help and this condiction is success. The problem is how to change automatically on address...

PHP Security: send POST to same URL = bad?

I had a response on a question yesterday about sending POST data to the same page with the Post-Redirect-Get pattern like this: if (isset($_POST['Submit'])) { // prevent resending data header("Location: " . $_SERVER['PHP_SELF']); } Someone replied: http://stackoverflow.com/questions/4016968/sending-data-to-same-php-page-from-j...

IIS 7 settings for directories without / at the end

i searched here, but i didn't find the solution to my problem So, basically, this is what i want. I moved a website to a server that has IIS 7 installed, and now when i put in the address bar a link like: domain.com/folder , it gives me a 404 error. folder is a directory that has inside a default.aspx file. but if i put domain.com/fold...

Making a 301 rewrite from within a folder using relative rewrite URLs

I have the following problem. We used many different URLs to the same page. Now we want to use only one URL for those pages. Here an example: RewriteRule ^(subfolder1/folder1/|(subfolder2|subfolder3)/folder2/|folder3/)?(name1|name2|name3|name4)$ scriptname.php [QSA,NC] As you can see it is pretty messy. What I now want to do is the fo...

Redirect to non-https pages

Hi, I have come accross many solutions similar to what I need but I have tried changing them and have had no luck, it seems to be ignoring them sometimes and not other times. Essentially I have a site which I need to have https on only on certain pages or all php pages if that is easier but not for friendly urls e.g. /womens/skirts/ S...

Javascript problem on Google Chrome and Apple Safari

Hi. I have a javascript that, when you finish to watch a video, it redirect you in another website. It runs good on IE and Firefox, but not run on Google Chrome and Apple Safari. Can anyone help me to find the problem? Many thanks. var currentState = "NONE"; var previousState = "NONE"; var player = null; function playerReady(thePlayer...

Prevent redirect after form is submitted

I have an HTML form that submits an email with PHP, and when it submits, it redirects to that PHP page. Is there a way to prevent this redirect from happening? I built an animation with jQuery that I want to occur instead of redirecting. I tried return false;, but it wouldn't work. Here's my function: $(function() { $('.submit').cli...

Need help with jquery validation plugin submitHandler redirect

I am having problems using the jquery validation plugin's submitHandler. I am working within the confines of some code that I do not have access to change so I am trying to find some work arounds. This is what I would like to do... After the form validates, when the user clicks the submit button, and it is successful redirect the page...

htaccess rewrite question

Hi all, I need to redirect incoming requests for a page to a subdirectory whilst keeping the URL displayed as originally typed. This is to manage language pages easier. For example, I want Spanish pages to be under www.mydomain.com/es. I want the URL displayed to remain www.mydomain.com/es. But the actual page is held here - www.mydo...

.htaccess alias URL

Hi I am trying to create a redirect of a temp URL using Redirect Permanent /dir/subdir http://www.domain.com/other_dir/htmlfile.html Note that "dir" exists in the file structure but "subdir" does not. In the browser if I type http://www.domain.com/dir/subdir the redirect works (even though, again, "subdir" does not exist) but http:/...

Working hyperlink breaks upon page redirection back to original page

Hello there I am playing a sound by the click on a link, I know not beautiful but it works. Well ran into a new problem today sound did not play the first time I clicked the link... But back to the question at hand. The HTML page playing the sound the redirects the browser back to the page I intend it to after playing the sound, but ...

IIS Redirect From Specific Outdated URL?

Hello all, One of my clients refers people to a certain URL. She prints the URL on physical letters, and the recipients have a few weeks to visit the URL and complete the task. Let's say that the URL she gives is: www.department-a.domain.com/folder/important-page.html The problem is that I am switching Content Management Systems so ...

How to redirect without www using Rails 3 / Rack?

I understand there are a lot of questions that answer this. I'm familiar with .htaccess and nginx.conf methods, but I do not have access to such traditional configuration methods on heroku. Simone Carletti gave this answer that leverages Rails 2.x Metals, but I'm using Rails 3 and this isn't compatible. http://stackoverflow.com/questio...

Redirect windows process to new URL

How do I redirect a program to connect to a different URL. I looked at this post: http://stackoverflow.com/questions/989282/is-it-possible-to-redirect-a-url-to-another-using-a-webproxy-such-as-fiddler I installed fidller on the machine and put this code in the custom rules in the onBeforeResponse method oSession.utilDecod...

"Redirect" page without refresh (Facebook photos style)

I am trying to implement content browsing like it is done on Facebook when user is browsing the photos. I guess everyone is familiar with that photo browsing where you can click "next" and "previous" and immediately get the next or previous photo (you can also navigate using arrow keys). When you click "next" for example you notice that...

Redirect IE browsers using .htaccess (away from an xhtml)

Hello, as the title says, I want to use an xhtml as my homepage and I want to redirect visitors using Internet Explorer browsers to a different page (a .htm with less content that says "You're using IE, tough tittie."). Since IE automatically downloads app/xhtml files, I can't do this using javascript and whatnot, so I think the only op...

[HTACCESS] Redirect to a .html if from some domain

Hi! I have two domains that are pointing to the same directory, but I would like to redirect them (via mod_rewrite in htaccess) to some specific .html when hitting home. Like: if (domain == 'firstdomain') redirect firstdomain.html else if (domain == 'seconddomain') redirect seconddomain.html Thanks! Joe ...

best method for domain re-direct

i have an old site im not maintaing anymore, but will be keeping the domain and hosting in the mean time... its linux php based... what is the best, and easist method for a domain redirect? thx ...

How to redirect a program that writes to tty?

This is the un-redirected output (if you don't know what module is, it doesn't matter much): $ module help null ----------- Module Specific Help for 'null' ----------------------- This module does absolutely nothing. It's meant simply as a place holder in your dot file initialization. Version 3.2.6 S...