Search Results

Search found 853 results on 35 pages for 'redirection'.

Page 14/35 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • help regarding dynamic redirect rule in htaccess

    - by user251336
    hi all, I need ur help for given subject. I am playing with htaccess rules first time in life. here is the scene - i want to redirect the urls - http://www.abc.com/var1 http://www.abc.com/var2 to follwing urls - http://www.abc.com/index.php?u=var1 http://www.abc.com/index.php?u=var2 In this case the values var1 & var2 can be anything (i.e. string which will contain only alphanumeric characters.) One more thing - I want to skip this rule if the url is - http://www.abc.com/SKIPME Please help me to write this rule! Regards, Shahu!

    Read the article

  • Process data BEFORE a 301 Redirect?

    - by Jesse
    So, I've been working on a PHP link shortener (I know, just what the world needs). Basically when the page loads, php determines where it needs to go and sends a 301 Header to redirect the browser, like so... Header( "HTTP/1.1 301 Moved Permanently" ); header("Location: http://newsite.com"; Now, I'm trying to add some tracking to my redirects and insert some custom analytics data into a MySQL table before the redirect happen. It works perfectly if I don't specify the a redirect type and just use: header("Location: http://newsite.com"; But, of course as soon as you add in the 301 header, nothing else gets processed. Actually, on the first request, it sends the data to MySQL, but on any subsequent requests there's no communication with the database. I assume it's a browser caching issue, once it's seen the 301 it decides they're no reason to parse anything on future requests. But, does anyone know if there's any way to get around this? I'd really like to keep it as a 301 for SEO purposes (I believe if you don't specify it sends a 404 by default?). I thought about using .htaccess to prepend a file to the page that will do the MySQL work, but with the 301, wouldn't that just get ignored as well? Anyway, I'm not sure if there's any solution other than using a different type of redirect, but I'm ready to give up just yet. So, any suggestions would be much appreciated. Thanks!

    Read the article

  • Regex pattern help (I almost have it, just need a bit of expertise to finish it)

    - by Mohammad
    I need to match two cases js/example_directory/example_name.js and js/example_directory/example_name.js?12345 (where 12345 is a digit string of unknown length and the directory can be limitless in depth or not exist at all) I need to capture in both cases everything between js/ and .js and if ? exists capture the digit string after ? This is what I have so far ^js/(.*).js\??(\d+)? This works except it also captures js/example_directory/example_name.js12345 I want the regex to ignore that. Any suggestions? Thank you all! Test your patterns here

    Read the article

  • Redirect window of command line tool to your app (Windows)

    - by dribler
    Hello, is there a way (on Windows XP+) to redirect the output of a window created by a process created with e.g. CreateProcess to a window of your own program? I'd like to make a nicer GUI for ffplay.exe which is an open source video player. It is a command line tool, which opens a simple window in which it plays back the video. Can I "capture" this window and display the output in my own program somehow? Thanks for any hints you can provide.

    Read the article

  • Powershell: Writing errors and ouput to a text file and Console

    - by smaclell
    I am trying to write the entire output (errors included) of an executing script to the console and a file at the same time. I have tried several different options .\MyScript.ps1 | tee -filePath C:\results.txt # only the output to the file .\MyScript.ps1 2> C:\results.txt # only the errors to the file and not the console .\MyScript.ps1 > C:\results.txt # only the output to the file and not the console My hope was that I could use the file to review the output/errors Any help would be greatly appreciated.

    Read the article

  • PHP Redirect location with htaccess

    - by Wayne
    In one of the page I have is where administrators are allowed, however, I use if the session isn't set, the header will redirect them to index.php and that method works. If I replace index.php with home which is for the htaccess which changes it to index.php but it gives an error in the browser This works: if(!isset($_SESSION['MEMBER'])){ header("Location: index.php"); } This does not work: if(!isset($_SESSION['MEMBER'])){ header("Location: home"); } htaccess: RewriteRule ^home$ index.php The error in Firefox: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies. What's wrong with it? How do I get this method to work?

    Read the article

  • Hiding URL when redirecting

    - by AZIRAR
    Hey, Is it possible that I can hide the URL where I redirect in CPANEL. For example : My Website : www.abc.com My other website : www.xyz.com When redirecting from abc.com to xyz.com I want that the adresse stay abc.com ! How can I make it in CPANEL. ??

    Read the article

  • Help Redirecting A Page to Another Page with adverts for 5 seconds, and then redirecting to another page.

    - by XcodeDev
    Hey, I am trying to redirect a page to another page, and that was working successfully. However I am trying to redirect the first page to another page with adverts. This page will then redirect to another page after five seconds. I am trying to do that by doing this: <?php include('ads.php'); ?> <?php sleep(2); $url = $_GET['url']; header("Location: ".$url.""); exit; ?> However it is showing the advert in ads.php perfectly, but it is not redirecting after five seconds. I am receiving this error in my web browser: Warning: Cannot modify header information - headers already sent by (output started at /home/nucleusi/public_html/adverts/ads.php:1) in /home/nucleusi/public_html/adverts/index.php on line 7 A typical link I would be redirecting to would be this: http://nucleusiphone.com/adverts/index.php/?url=http%3A%2F%2Fitunes.apple.com%2Fmx%2Falbum%2Fstill-got-the-blues%2Fid14135178%3Fi%3D14135158 Thanks in advanced. PS. I don't know any php so any code helps!

    Read the article

  • How to redirect non-www site to www site?

    - by Mohan Ahire
    I have created one wordpress site. As I write domain name without www then it opens correctaly but as I write www. in url it's not showing the site. Please help me.. Thank you in advance. I have edited my question and added the following part : Following is my file : Where I have to put code provided by you ? I tried it before the "Begin Wordpress" line but still not working. plugable.php -FrontPage- IndexIgnore .htaccess /.?? *~ *# /HEADER */README* */_vti* order deny,allow deny from all allow from all order deny,allow deny from all AuthName example.com AuthUserFile /home/example/public_html/_vti_pvt/service.pwd AuthGroupFile /home/example/public_html/_vti_pvt/service.grp BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] END WordPress

    Read the article

  • [CakePHP] Pagination after inserting or updateing record

    - by user198003
    one more question related with cakephp... let's say that i have 20+ records in my table. they are sorted by some criteria, ie. by title. and on a list view, i have a list of 10 records, with available pagination. how can i achieve that when i insert new record, to be redirected to proper page, where i can see record that is just was insterted? how can i get information on which page i have to be redirected? hope my question is enough clear for understanding... tnx in adv!

    Read the article

  • PHP: Redirect to the same page, changing $_GET.

    - by Jonathan
    Hi, I have this PHP piece of code that gets $_GET['id'] (a number) and do some stuff with this. When its finished I need to increase that number ($_GET['id']) and redirect to the same page but with the new number (also using $_GET['id']). I am doing something like this: $ID = $_GET['id']; // Some stuff here // and then: $newID = $ID++; header('Location: http://localhost/something/something.php?id='.$newID); exit; The problem here is that the browser stop me from doing it and I get this error from the browser (Firefox) : "The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete." Some help here please!

    Read the article

  • can't read from stream until child exits?

    - by BobTurbo
    OK I have a program that creates two pipes - forks - the child's stdin and stdout are redirected to one end of each pipe - the parent is connected to the other ends of the pipes and tries to read the stream associated with the child's output and print it to the screen (and I will also make it write to the input of the child eventually). The problem is, when the parent tries to fgets the child's output stream, it just stalls and waits until the child dies to fgets and then print the output. If the child doesn't exit, it just waits forever. What is going on? I thought that maybe fgets would block until SOMETHING was in the stream, but not block all the way until the child gives up its file descriptors. Here is the code: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/types.h> #include <unistd.h> int main(int argc, char *argv[]) { FILE* fpin; FILE* fpout; int input_fd[2]; int output_fd[2]; pid_t pid; int status; char input[100]; char output[100]; char *args[] = {"/somepath/someprogram", NULL}; fgets(input, 100, stdin); // the user inputs the program name to exec pipe(input_fd); pipe(output_fd); pid = fork(); if (pid == 0) { close(input_fd[1]); close(output_fd[0]); dup2(input_fd[0], 0); dup2(output_fd[1], 1); input[strlen(input)-1] = '\0'; execvp(input, args); } else { close(input_fd[0]); close(output_fd[1]); fpin = fdopen(input_fd[1], "w"); fpout = fdopen(output_fd[0], "r"); while(!feof(fpout)) { fgets(output, 100, fpout); printf("output: %s\n", output); } } return 0; }

    Read the article

  • Is it good practise to use meta refresh tags for redirects instead of header() function in php?

    - by Kent
    I have to use redirects a lot in my scripts, for example after a user logs in I need to redirect them to the admin area, etc. But I find it inconvenient to always have to have the header function at the very top. So if I use the meta refresh tags for my redirects, is that something that would be frowned upon according to best practices or is it acceptable? function redirect($location) { echo "<meta http-equiv='refresh' content='0; url=$location' />"; }

    Read the article

  • after dup2, stream still contains old contents?

    - by BobTurbo
    so if I do: dup2(0, backup); // backup stdin dup2(somefile, 0); // somefile has four lines of content fgets(...stdin); // consume one line fgets(....stdin); // consume two lines dup2(backup, 0); // switch stdin back to keyboard I am finding at this point.. stdin still contains the two lines I haven't consumed. Why is that? Because there is just one buffer no matter how many times you redirect? How do I get rid of the two lines left but still remember where I was in the somefile stream when I want to go back to it?

    Read the article

  • Perl, redirect stdout to file

    - by Mike
    I'm looking for an example of redirecting stdout to a file using Perl. I'm doing a fairly straightforward fork/exec tool, and I want to redirect the child's output to a file instead of the parents stdout. Is there an equivilant of dup2() I should use? I can't seem to find it

    Read the article

  • Redirecting http to https for a directory, via .htaccess, using mod_alias only

    - by Belinda
    I have the common problem of wanting to redirect requests for a certain restricted access directory from http to https, so that users' login credentials are sent in a secure way. However, I do not have mod_rewrite enabled on my server. I only have mod_alias. This means I have to use the RedirectMatch command. I can't use the usual solutions that use RewriteCond and RewriteRule. (A note on the politics: I am a small-fry subsite maintainer in a very large organisation, so the server admins are unlikely to be willing to change the server config for me!) The following line works, but forms an infinite loop (because the rewritten URL is still caught by the initial regular expression): RedirectMatch permanent ^/intranet(.*)$ https://example.com/intranet$1 One of my internal IT guys has suggested I avoid the infinite loop by moving the files to a new directory with a new name (eg /intranet2/). That seems pretty ugly to me. And people could still accidentally/deliberately revert to an insecure connection by visiting http://example.com/intranet2/ directly. Then I tried this, but it didn't work: RedirectMatch permanent ^http:(.*)/intranet(.*)$ https://example.com/intranet$1 I suspect it didn't work because the first argument must be a file path from the root directory, so it can't start with "http:". So: any better ideas how to do this?

    Read the article

  • IIS redirects to url beginning with "http://http" although syntax in web.config file appears to be alright

    - by user1608920
    Here's what I have so far: <?xml version="1.0" encoding="UTF-8"?> <configuration> <location path="osb"> <system.webServer> <httpRedirect enabled="true" exactDestination="true" destination="http://50.63.54.135/app/osb" httpResponseStatus="Permanent" /> </system.webServer> </location> </configuration> The above redirect works, but it takes me to http://http//50.63.54.135/app/osb instead of just http://50.63.54.135/app/osb This produces an 404 error. I tried to remove "http://" from destination. Same effect. What am I missing ?

    Read the article

  • How to handle redirections with codeigniter?

    - by SinneR
    Hi, im having problems starting a codeigniter project, the problem is that when i do something in a controller and then i want a page to display the result, an example: i have a form to add a item to the database, i get all the data in the controller and save it to database and then i want (if all went well) to redirect to the main page with a success msg, i was doing this with $this->load->view('admin', $data); the problem is that the url keeps saying admin/addItem so everytime the page gets refreshed it adds another item, now i found the: redirect('admin','refresh'); but this only helps me when i dont need to display any msg because this function dont allow to send a $data var. Any ideas? Probably this is really easy to fix but i cant find a way to handle the flow of the application the way i want, any help is apreciated. thanks ;)

    Read the article

  • Trouble with Remote Desktop pulling through printers. Drive Redirection works, and the ports created but not the printers

    - by Windex
    I've run out of things to look into. All the support documents have been gone through and still provide no resolution. I've checked the service permissions, (sc sdshow spooler) they all match up with other systems and what is output on the support documents. I'm nearly positive that the issue can't be permissions anyway as the software requires all users to be an administrator, so all users are a local administrator. (I haven't looked into why yet but its on the list, I was just recently brought into this team and we've put procedures in place for quick recovery.) We've applied hot fixes relating to RDS and printing, though I'm not sure which ones they were. I've combed through group policy and no where is printer redirection disabled. It's setup with all default values regarding the use and redirection of printers and a quick install of W2k8 R2 shows that it works by default. This dev install was joined to the same domain, placed in the same OU, shows the same policies applied, etc, etc, etc, The server generates all the correct redirected ports but no printers are created. It will also redirect drives without issue, this would seem to rule out the usermode service that handles redirects being broken. No events are logged related to any of the events and there are no events from the TerminalServices-Printer source. There were local printers setup. I didn't think it would mattter but as I was running out of ideas I tried deleting them all with no change. The TS was configured for the software it will be running before we checked out the redirection of printers so the other team responsible to setting up new servers wants to find a fix instead of reloading a new server. I'm not sure where or what else to look for. Any ideas?

    Read the article

  • Multisystem Script won't work! "Syntax error:redirection unexpected" Worked 2 days ago?

    - by user74005
    this is my first question. I use Multisystem all of the time and have installed it on both Kubuntu and Ubuntu and have used it with no issues. I wiped my hard drive to try some new OSs I'm now using the exact same OS (Ubuntu 12.05) I used to load my USB stick to begin with and now I'm getting this ridiculous syntax error. I know the script is correct, I'm following the exact same steps I used to get to this point and I'm getting different results ?!?! I'm very confused by this. I have no clue how to begin addressing this issue. I get the same syntax error on Kubuntu now too, which did have multisystem installed. I run "sh install-depot-multisystem.sh" and get "Syntax error:redirection unexpected", this worked literally 2 days ago. The only thing that has changed is my face has grown some more facial hair and my head hurts from bangin it against the wall over this issue. The OS is exactly the same, the script is the same; but now it won't install. I'm lost and really hoping someone can help. Append Just to append to this a bit https://lists.ubuntu.com/archives/ub...er/000264.html I needed to do a chmod 777 on the script, I'm still getting a syntax error on Kubuntu...but it did install successfully. I'll mark this as resovled! Thanks anyway, I'll try to spruse up on my Linux skills.

    Read the article

  • Is doing AB Tests using site redirection a bad practice?

    - by user40358
    I'm developing hotels websites here in Brazil. When the site is done, we do an AB test with the old version to measure conversion and show to the hotel owner how good our site is. Due to the fact that I cannot put the old site inside the new one as a subresource (newone.com/old), currently I'm doing those AB test as follows: 1) I create 2 Google Analytics accounts, one for each site (old and new); 2) I put the GA tags in the old website pages (changing its possibly existent GA ID to the just created one); 3) I put an Javascript code that redirects the user to the old website (in a different URL and different domain) with 50% of probability. So I compare all the metrics, events and goals between those two GA accounts. How bad is it? How Google can interpretate the fact of being, sometimes redirected, sometimes don't? The experiment usually runs for 2 weeks. Is there any other alternative for doing this in a better way?

    Read the article

  • Active Directory Support Folder Redirection AND Portable Home Directories?

    - by Robert F
    Does anyone here know if Active Directory will support the use of both Windows Folder Redirection and Mac OS X's Portable Home Directories for synchronizing a user's files to a remote share? I want to synchronize my user's files with a remote share as a way of backing up their data. This is fairly straightforward if a user has only a Windows computer or only a Mac computer. However, will Active Directory support a situation in which a user has both types of computers or they have a Mac on which they're running Windows within Parallels? If I configure a remote share via Group Policies for their Windows files and then configure a different share for their Mac files via ADUC, when they change a file on either computer, will AD know which computer the file was changed on and synchronize that file with the appropriate remote folder? Thanks!

    Read the article

  • Can tomcat perform ssl redirection by filtering host alias?

    - by Stephen
    Hi, We have a tomcat server (6.0.20) running one web application behind two urls, e.g. www.foo and secure.foo This is configured in the server.xml as one host with a single alias: <Host name="www.foo" appBase="webapps"> <Context docBase="foo" path=""></Context> <Alias>secure.foo</Alias> </Host> Ideally we'd like any requests to secure.foo on port 80 to be automatically redirected to use ssl. However, I can only find instructions for redirecting based on the path after the hostname, so I could add a /* security constraint but then this would apply to both urls. Does anyone know if it's possible to apply the redirection by filtering on hostname requested? (We've already got the ssl connector, certificate, etc. working ok). I know we could do it by sticking an apache server in front of tomcat and handling the redirection there, but I'm curious to know if tomcat can do this on its own. Thanks

    Read the article

  • How can I get a 302 redirection URL's Location header in PHP?

    - by QAH
    I am trying to find a universal way to expand most if not all of the shortened URLs out there. I know short URLs such as bit.ly, TinyURL, goo.gl, etc use the 302 redirection method to redirect you to another site. How can I make a HEAD request to the shortened URL in php and get the "Location" part of the header? Please help me with this. Thanks

    Read the article

  • How to get forkpty to handle redirection and other bash-isms?

    - by Jeremy Friesner
    Hi all, I've got a GUI C++ program that takes a shell command from the user, calls forkpty() and execvp() to execute that command in a child process, while the parent (GUI) process reads the child process's stdout/stderr output and displays it in the GUI. This all works nicely (under Linux and MacOS/X). For example, if the user enters "ls -l /foo", the GUI will display the contents of the /foo folder. However, bash niceties like output redirection aren't handled. For example, if the user enters "echo bar /foo/bar.txt", the child process will output the text "bar /foo/bar.txt", instead of writing the text "bar" to the file "/foo/bar.txt". Presumably this is because execvp() is running the executable command "echo" directly, instead of running /bin/bash and handing it the user's command to massage/preprocess. My question is, what is the correct child process invocation to use, in order to make the system behave exactly as if the user had typed in his string at the bash prompt? I tried wrapping the user's command with a /bin/bash invocation, like this: /bin/bash -c the_string_the_user_entered, but that didn't seem to work. Any hints?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >