Search Results

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

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

  • Old query String hard coded 301 url redirection using htaccess

    - by Nilesh Toshniwal
    I have recently changed CMS of my website and now looking to redirect old urls like: oldpage.php?key=7cdb93c26 to some new urls but I want all of them in hard coded way and it should be a 301 redirect I tried the following rules but none of them work for me redirect 301 /oldpage.php?key=7cdb93c26 http://www.mynewsite.com/my-new-page.html redirect 301 "/oldpage.php?key=7cdb93c26" http://www.mynewsite.com/my-new-page.html RewriteRule ^oldpage.php?key=7cdb93c26$ http://www.mynewsite.com/my-new-page.html [L,R=301] RewriteRule ^oldpage.php?key=7cdb93c26$ /my-new-page.html [L,R=301]

    Read the article

  • ASP.NET Login Page Redirection Problem

    - by Daniel
    Hello everyone! I'm building a silverlight application hosted on ASP.NET Web App. / IIS7 / SSL-enabled website. For security, I put my silverlight page inside a Members folder in the ASP.NET Web Application, and restricted access from anonymous users.(see web.config below) when users try to access pages under Members folder, they get redirected to https://www.ssldemo.com/authenticationtest/login.aspx. (see web.config below) (I've mapped www.ssldemo.com to 127.0.0.1). for security, I'm switching to HTTPS in login.aspx, and back to HTTP after validation. below is the code for login.aspx.cs. protected void Page_Load(object sender, EventArgs e) { LoginControl.LoggedIn += new EventHandler(LoginControl_LoggedIn); } void LoginControl_LoggedIn(object sender, EventArgs e) { //for going to ReturnURL & switching back to HTTP string serverName = HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]); string returnURL = Request["ReturnURL"]; Response.Redirect(ResolveClientUrl("http://" + serverName + returnURL)); } The problem is, when I deploy another application to http://www.ssldemo.com/authenticationtest/members/AnotherApplication/ and open http://www.ssldemo.com/authenticationtest/members/AnotherApplication/default.aspx, Users get redirected to https://www.ssldemo.com/authenticationtest/login.aspx?ReturnUrl=%2fauthenticationtest%2fmembers%2fanotherapplication%2fdefault.aspx. but even when I enter the correct credentials at login page, I get redirected to the same login page again, not to the ReturnUrl. when I looked into fiddler, it said '302 object moved to here.' Thank you for reading! Any input will be much appreciated. <configuration> <connectionStrings> <add name="CompanyDatabase" connectionString="Data Source=192.168.0.2;Initial Catalog=SomeTable;User ID=Username;Password=P@ssword" /> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0" /> <authentication mode="Forms"> <forms slidingExpiration="true" timeout="15" loginUrl="https://www.ssldemo.com/authenticationtest/login.aspx" defaultUrl="~/Members/Default.aspx" > </forms> </authentication> <!--Custom Membership Provider--> <membership defaultProvider="MyMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear /> <add name="MyMembershipProvider" type="AuthenticationTest.Web.MyMembershipProvider" connectionStringName="CompanyDatabase" applicationName="AuthenticationTest.Web"/> </providers> </membership> </system.web> <!--securing folders--> <location path="Members"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> </configuration>

    Read the article

  • Catching the redirected address from NSURLConnection

    - by Vic
    I'm working on a software which follows the HTTP redirection which is dynamically calculated by the server depending on a pparameter. I don't want to show the primary server in Mobile Safari but rather the redirected address only. The following code workks: request = [NSMutableURLRequest requestWithURL:originalUrl cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10]; [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; // Extract the redirected URL target = [response URL]; The problem is that the server requires several seconds to answer. The sendSynchronousRequest blocks the app for this time completely which is messy, I can't even display the "Busy" animation. Does anyone know how I can retrieve the redirected address asynchronously without safari appearance in the meanwhile with the redirecting server URL or display some sort of the "Be patient" animation during the sendSynchronousRequest? What disadvantages would have the passing of sendSynchronousRequest in another thread?

    Read the article

  • Regarding Authlogic and page redirection.

    - by Paddy
    I am using authlogic for authentication in my Rails app. Have named routes for the frequent actions, viz: map.login "login", :controller = "user_sessions", :action = "new" map.logout "logout", :controller = "user_sessions", :action = "destroy" map.register "register", :controller = "users", :action = "new" map.edit 'user/edit/:id', :controller = "users", :action = "edit" But also in my routes.rb i have these automatically created REST routes too: map.resources :user_sessions map.resources :users The problem now is that a user can login from two different routes. Ex: From, http://localhost/login and also from http ://localhost/user_sessions/new. How do i restrict access only from the named route i have defined and not allow from user_sessions/new?

    Read the article

  • redirection follow by post

    - by lucas
    hi, just wonder how those air ticket booking website redirect the user to the airline booking website and then fill up(i suppose doing POST) the required information so that the users will land on the booking page with origin/destination/date selected? Is the technique used is to open up new browser window and do a ajax POST from there? Thanks.

    Read the article

  • Help with authorization and redirection decorator in python (pylons)

    - by ensnare
    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(BaseController): @authenticate def index(self): return render('/index.mako' ) But this approach doesn't work. When a user is authenticated, everything is fine. But when the user is not authenticated, redirect_to() doesn't work and I am given this error: HTTPFound: 302 Found Content-Type: text/html; charset=UTF-8 Content-Length: 0 location: /login Thank for your help!

    Read the article

  • Error after redirection using CakePHP

    - by Praveen kalal
    I have created some code called LoginController. Whenever Admin gets successfully logged in I redirect the page to index. However, I got an error like "problem on loading page". This is my code: <?php class LoginController extends AdminAppController { var $name = 'Login'; var $uses = array('Admin.Login'); var $sessionkey= ''; /*function beforeFilter() { if($this->Session->read('user')=='Admin' || $this->params['action']=='login') { echo "in"; exit; } else { echo "else"; exit; $this->Session->setFlash('Login first','flash_failure'); $this->redirect(array('action'=>'login')); } }*/ function index() { } function login() { //pr($this->data); exit; if(!empty($this->data)) { $results = $this->Login->findByEmail($this->data['Login']['email']); if(!empty($results) && $results['Login']['password']== md5($this->data['Login']['password'])) { $this->Session->write('user', 'Admin'); $results['Login']['last_login']=date("Y-m-d H:i:s"); $this->Login->save($results); $this->Session->setFlash('Login successfully.', 'flash_success'); $this->redirect(array('controller'=>'login','action' => 'index')); } } } } ?> Can anyone help me? Thanks.

    Read the article

  • C# - Realtime console output redirection

    - by Levo
    I'm developing a C# application and I need to start an external console program to perform some tasks (extract files). What I need to do is to redirect the output of the console program. Code like this one does not work, because it raises events only when a new line is writen in the console program, but the one I use "updates" what's shown in the console window, without writting any new lines. How can I raise an event every time the text in the console is updated? Or just get the output of the console program every X seconds? Thanks in advance!

    Read the article

  • URL redirection if wrong url

    - by xRobot
    I have this method in my book model: def get_absolute_url(self): return "/book/%s/%s/%i/%i/" % ( self.book_title, self.book_editor, self.book_pages, self.id) So the urls of each book are like this: example.com/book/the-bible/gesu-crist/938/12/ I want that if there is an error in the url, then I get redirected to the real url by using book.id in the end of the url. For example if I go to: example.com/book/A-bible/gesu-crist/938/12/ the I will get redirected to: example.com/book/the-bible/gesu-crist/938/12/ How can I do that ?

    Read the article

  • HTACCESS redirection with a word replacement in url

    - by Marwen
    I'm having trouble with this reg expression which i belive is correct, but it is not working. What im trying to do is redirect bunch of urls containing a specific string like this: http://www.example.com/**undesired-string**_another-string to http://www.example.com/**new-string**_another-string and http://www.example.com/folder/**undesired-string**/another-string to http://www.example.com/folder/**new-string**/another-string So i have this code in the .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule (.+)+(undesired-string)+(.+) $1new-string$2 [R=301,L] </IfModule> This should replace ANY undesired-string in any url to new-string, but it is not working, any idea why ? Thank you

    Read the article

  • mod_rewrite per-dir redirection returning a 400

    - by Eaterrust
    I moved my images directory to a different folder, and now I want to redirect all images requests from that folder to the new one. I do not have access to the main configuraion file, so I'm doing this in a .htaccess. I tried this, and it works:     RewriteCond %{REQUEST_URI} old_dir/.+.(jpg|png|gif)$     RewriteRule old_dir/(.+[^/]+..+)$ $1 [L,PT] But since they have permanently moved, I want to do a proper redirect, so I added the [R] flag, like this:      %{REQUEST_URI} old_dir/.+.(jpg|png|gif)$     RewriteRule old_dir/(.+[^/]+..+)$ $1 [L,PT,R] But the server gets confused, and returns a 400, so I looked at the log file, and this is what happens:     strip per-dir prefix: C:/wamp/www/natrazyle/old_dir/images/banner.jpg - old_dir/images/banner.jpg     applying pattern 'old_dir/(.+[^/]+..+)$' to uri 'old_dir/images/banner.jpg'     rewrite 'old_dir/images/banner.jpg' - 'images/banner.jpg'     add per-dir prefix: images/banner.jpg - C:/wamp/www/natrazyle/images/banner.jpg     explicitly forcing redirect with http://localhost/C:/wamp/www/natrazyle/images/banner.jpg As you can see, the full local path gets added after localhost I know I'm doing something wrong, I just can't figure it out myself. Any help would be greatly appreciated...

    Read the article

  • Need help with regular expressions - URL redirection

    - by paperless
    Hello everyone. I'm trying to redirect an easy to remember url to a php file but I'm having some trouble with the regex. Here's what I have at the moment: RewriteRule ^tcb/([a-zA-Z0-9]{1,})/([a-zA-Z0-9]{1,})/([a-zA-Z0-9]{1,}) /tcb/lerbd.php?autocarro=$1&tipo=$2&dsd=$3 It is working but only if I supply all 3 arguments. I want the last two arguments to be optional so it either works with only the first or all three. I'm hoping you can help me with this. Thank you very much.

    Read the article

  • SQL Server Redirection

    - by MrTehee
    We are switching from a SQL cluster to a mirrored solution. The problem is that we have a bunch of programs that would have to switch connection strings to handle the failover. Is there any way the we can set up a redirect or proxy that would take any legacy requests and forward them to the mirrored solution?

    Read the article

  • Design to distribute work when generating task oriented input for legacy dos application?

    - by TheDeeno
    I'm attempting to automate a really old dos application. I've decided the best way to do this is via input redirection. The legacy app (menu driven) has many tasks within tasks with branching logic. In order to easily understand and reuse the input for these tasks, I'd like to break them into bit size pieces. Since I'll need to start a fresh app on each run, repeating a context to consume a bit might be messy. I'd like to create an object model that: allows me to concentrate on the task at hand allows me to reuse common tasks from different start points prevents me from calling a task from the wrong start point To be more explicit, given I have the following task hierarchy: START A A1 A1a A1b A2 A2a B B1 B1a I'd like an object model that lets me generate an input file for task "A1b" buy using building blocks like: START -> do_A, do_A1, do_A1b but prevents me from: START -> do_A1 // because I'm assuming a different call chain from above This will help me write "do_A1b" because I can always assume the same starting context and will simplify writing "do_A1a" because it has THE SAME starting context. What patterns will help me out here? I'm using ruby at the moment so if dynamic language features can help, I'm game.

    Read the article

  • Page not redirecting properly(php)

    - by user225269
    I want to do the login page this way so that I won't be having trouble posting the username in the userpage. But everytime I try to access login.php. I get an error in firefox, that the page is not redirecting properly. What do I do? This works when I separate them into two. Into something like, login.php and verifylogin.php as the form action. But if I do it like this, I get redirection errors: <?php $host="localhost"; $username="root"; $password="nitoryolai123$%^"; $db_name="school"; $tbl_name="users"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $uname = mysql_real_escape_string($_POST['username']); $pword = mysql_real_escape_string($_POST['password']); $SQL = "SELECT * FROM users WHERE username = '$uname' AND password = '$pword'"; $result = mysql_query($SQL); $num_rows = mysql_num_rows($result); if ($result) { if ($num_rows > 0) { session_start(); $_SESSION['login'] = "1"; header ("Location: userpage.php"); } else { session_start(); $_SESSION['login'] = ""; header ("Location: login.php"); } } else { $errorMessage = "Error logging on"; } ?> <tr> <form name="form1" method="post" action="login.php"> <td> <table> <tr> <td><strong><font size="2">Login User</strong></td> </tr> <tr> <td width="30" height="35"><font size="2">Username:</td> <td width="30"><input name="username" type="text" id="username" maxlength="17"></td> </tr> <tr> <td width="30" height="35" ><font size="2">Password:</td> <td width="30"><input name="password" type="password" id="password" maxlength="17"></td> </tr> <td><td align="right" width="30"><input type="submit" name="Submit" value="Submit" /></td> <td><input type="reset" name="Reset" value="Reset"></td></td> </tr> </form> please help, thanks.

    Read the article

  • redirect http to https for some page in site in APACHE

    - by Avinash
    Hi I want to one of my site's page will use only HTTPS. i have given manually link to all sites to https. But i want that if user manually types that page url with http then it should be redirected to https page. So if user types. http://mydomain.com/application.php then it should be redirected to https://mydomain.com/application.php Thanks Avinash

    Read the article

  • how to redirect stdin to java Runtime.exec ?

    - by jprogram2010
    I want to execute some sql scripts using Java's Runtime.exec method. I intend to invoke mysql.exe / mysql.sh and redirect the script file to this process. From the command prompt I can run the command <mysqInstallDir\/bin\mysql.exe -u <userName> -p <password> < scripts\create_tables.sql I can invoke mysql.exe using Runtime.exec but how do I redirect data from sql file to mysql.exe ?

    Read the article

  • Rogue black-box java application not responding to standard input redirect

    - by Stefan Kendall
    I have an external java application (blackbox), which requires authentication. I need to run this application in a batch setting, but it seems to be reading from standard input in some nonstandard way. That is, if I set the calling of the program to redirect STDIN to a file (... <password.txt) or pipe data to it (echo mypasword | ...), it does not recognize the input. As I run it, also, it seems to intercept Cntrl+c and Cntrl+d and Cntrl+z as legitimate password characters, so it must be doing something odd and not just reading from standard in. Any idea what this application could be doing to read in input? I need to be able to send it information programmatically, and I'm stumped for the moment.

    Read the article

  • Different result with reverse proxy apache and lighttpd.

    - by Danny
    I have an Apache server running in reverse proxy mode in front of a Tomcat java server. It handle HTTP and HTTPS and send those request back and forth to the Tomcat server on an internal HTTP port. I'm trying to replace the reverse proxy with Lighttpd. Here's the problem: while asking for the same HTTPS url, while using Apache as the reverse proxy, the Tomcat server redirect (302) to an HTTPS page but with Lighttpd it redirect to the same page in HTTP (not HTTPS). What does Lighttpd could do different in order to have a different result from the backend server? In theory, using Apache or Lighttpd server as a reverse proxy should not change anything... but it does. Any idea? I'll try to find something by sniffing the traffic on the backend tomcat server.

    Read the article

  • DotnetNuke redirect

    - by X-Dev
    our client needs to shortcuts to particular pages We need to redirect non existent urls like http://site.com/promotion1 to the actual URL similar to http://site.com/promotions/promotion1/tabid/799/language/en-AU/Default.aspx ... I've sent a list of appropriate DNN modules to our client but it may take them forever to get back to me. In the mean time they still submitting requests to us to create redirects for them. if there's no cost involved then i wont have to wait for them to get back to me. so I'm looking for a Quick and free way to enable the clients to set these up on this own. I've looked at: http://www.snowcovered.com/snowcovered2/Default.aspx?tabid=242&PackageID=3302 http://www.ventrian.com/Resources/Projects/FriendlyUrls.aspx http://www.codeproject.com/kb/aspnet/dnn2url_rewrite.aspx But haven't had much luck in the small amount of time i have available. Has anyone got some suggestions on how to achieve our goal with either the above resources or maybe some additional resource i haven't found yet? (DNN v4.9)

    Read the article

  • Unable to capture standard output of process using Boost.Process

    - by Chris Kaminski
    Currently am using Boost.Process from the Boost sandbox, and am having issues getting it to capture my standard output properly; wondering if someone can give me a second pair of eyeballs into what I might be doing wrong. I'm trying to take thumbnails out of RAW camera images using DCRAW (latest version), and capture them for conversion to QT QImage's. The process launch function: namespace bf = ::boost::filesystem; namespace bp = ::boost::process; QImage DCRawInterface::convertRawImage(string path) { // commandline: dcraw -e -c <srcfile> -> piped to stdout. if ( bf::exists( path ) ) { std::string exec = "bin\\dcraw.exe"; std::vector<std::string> args; args.push_back("-v"); args.push_back("-c"); args.push_back("-e"); args.push_back(path); bp::context ctx; ctx.stdout_behavior = bp::capture_stream(); bp::child c = bp::launch(exec, args, ctx); bp::pistream &is = c.get_stdout(); ofstream output("C:\\temp\\testcfk.jpg"); streamcopy(is, output); } return (NULL); } inline void streamcopy(std::istream& input, std::ostream& out) { char buffer[4096]; int i = 0; while (!input.eof() ) { memset(buffer, 0, sizeof(buffer)); int bytes = input.readsome(buffer, sizeof buffer); out.write(buffer, bytes); i++; } } Invoking the converter: DCRawInterface DcRaw; DcRaw.convertRawImage("test/CFK_2439.NEF"); The goal is to simply verify that I can copy the input stream to an output file. Currently, if I comment out the following line: args.push_back("-c"); then the thumbnail is written by DCRAW to the source directory with a name of CFK_2439.thumb.jpg, which proves to me that the process is getting invoked with the right arguments. What's not happening is connecting to the output pipe properly. FWIW: I'm performing this test on Windows XP under Eclipse 3.5/Latest MingW (GCC 4.4).

    Read the article

  • [Python] Detect destination of shortened, or "tiny" url

    - by conradlee
    I have just scraped a bunch of Google Buzz data, and I want to know which Buzz posts reference the same news articles. The problem is that many of the links in these posts have been modified by URL shorteners, so it could be the case that many distinct shortened URLs actually all point to the same news article. Given that I have millions of posts, what is the most efficient way (preferably in python) for me to detect whether a url is a shortened URL (from any of the many URL shortening services, or at least the largest) Find the "destination" of the shortened url, i.e., the long, original version of the shortened URL. Does anyone know if the URL shorteners impose strict request rate limits? If I keep this down to 100/second (all coming form the same IP address), do you think I'll run into trouble?

    Read the article

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