Results 1 to 7 of 7

Thread: Browser Redirecting

  1. #1
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Smile Browser Redirecting

    hi all

    i want send a http response to a browser that it navigate to a specific url that i want
    can any one tell me what this response is??

    thx
    Life is about making the right decisions and moving on.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Browser Redirecting

    To open given url in a system browser use QDesktopServices::openUrl.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,579
    Thanks
    13
    Thanked 1,584 Times in 1,513 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Browser Redirecting

    If you are asking what your program, acting as an HTTP server, should return then you need to send a 300 series HTTP Status code. This has nothing to do with Qt.

  4. #4
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Default Re: Browser Redirecting

    hi Chris
    thanks for reply
    i know that i must use a status line with 300 series code,but i don't know what header is good for my work.
    please tell me which header is good for this work?
    thanks in advance.
    Life is about making the right decisions and moving on.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Browser Redirecting

    "Location". Next time please post in the right forum (General Programming).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Default Re: Browser Redirecting

    thanks a lot...
    Life is about making the right decisions and moving on.

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,579
    Thanks
    13
    Thanked 1,584 Times in 1,513 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Browser Redirecting

    Quote Originally Posted by Ali Reza View Post
    i know that i must use a status line with 300 series code,but i don't know what header is good for my work.
    Why didn't you volunteer that information in the first place rather than issue a general question with no specifics?
    please tell me which header is good for this work?
    "Location" as wysota says and as documented under 301/302 in the page I linked to. You should also put a short HTML message and link in the response body.

Similar Threads

  1. Replies: 0
    Last Post: 17th March 2011, 04:17
  2. Not able to run fancy browser and demo browser example applications
    By GoGetIt in forum Installation and Deployment
    Replies: 1
    Last Post: 16th August 2010, 07:23
  3. redirecting ASSERTs
    By drhex in forum Qt Programming
    Replies: 2
    Last Post: 24th July 2009, 22:59
  4. QT4 HTTP Example and Redirecting
    By jiveaxe in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2008, 17:42
  5. Redirecting qDebug()
    By hardgeus in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2006, 02:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.