Search Results

Search found 52885 results on 2116 pages for 'http redirect'.

Page 92/2116 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • htaccess redirect to subfolder and mask the url?

    - by KiwiCoder
    Hello all, Two things: Firstly - I have version 2 of a website located in a folder named v2, and I want to redirect any traffic that is NOT a child of the v2 folder, to www.example.com/v2 The old site located in the root was created in iWeb and has a LOT of subfolders and sub-subfolders. So: www.example.com/v2 = New site www.example.com/Page.html www.example.com/category/Page.html ww.example.com/category/subcategory/Page.html = All generic examples of what I need to redirect. Secondly, and I don't know if this is possible, I want to hide /v2/ in the URL, so that visitors will just see www.example.com/page even though they are actually on www.example.com/v2/page Links are hardcoded to the v2 folder, like so <a href="v2/contact.html" Any help is MOST appreciated. I've spent hours trying to figure this out, but I'm only just learning about htaccess and regular expressions, and am totally confused. Thanks so much!

    Read the article

  • 301 Redirects, and the correct regex to go with it

    - by Tisch
    Hi Guys, I have several URLs that I want to redirect to the same place, however these are dynamic URLs. The structure is something like this: http://www.mysite.com/declaration/list?[query_string] What I think would be ideal for this situation is to use some regex in my .htaccess file to redirect all these links to the sites home page. I was wondering if someone could help me with the regex for this situation. So far, I have this, but it doesn't work: RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^/declaration/list$ http://www.mysite.com/$ [R=301,L] My regex is weak to say the least, something I want to, and am trying to learn. Thanks in advance. Tom

    Read the article

  • Tomcat - Redirect to Error Page when ServletContextListener fails

    - by Vic
    When Tomcat starts it calls my ServletContextListener to obtain a database connection, which I will later use in other servlets with getServletContext(). It is called in my web.xml as: listener listener-class org.ppdc.database.DBCPoolingListener /listener-class /listener (I removed the < because they wouldn't display properly in this message. If I cannot connect to the database when Tomcat starts up I get a 404 error, because Tomcat cannot start the application. How can I redirect the user to a custom error page at this point? I tried the following in my web.xml (I have the < brackets in the original): (error-page) (error-code404/error-code) (location/file_not_found.html/location) (/error-page) Any ideas on how to redirect a user to one of my error pages when Tomcat tries to start the application? Thanks Vic

    Read the article

  • paypal redirect on successful checkout

    - by Graeme Leighfield
    I am trying to get my Paypal subscription to redirect to a custom page after a successful checkout. Before submitting to Paypal I overload the submit handler, run my own function (to store details) and return a unique id. I want to attach that id to my return URL. (as a GET or POST var so to speak) I have turned auto redirect "on" in my Paypal sandbox sellers preferences, but it only seems to re-direct to the URL that I HAVE to put in there. using the <input type="hidden" name="return" value="someurl" /> does no seem to work. I want it this way so that I can capture the user information when entered with a "non-paid" flag, then via the IPN I can update that record with a "PAID" flag, and I want to use the unique ID to tie it all together so to speak. Any advice or a different approach is welcomed. Many thanks!

    Read the article

  • Use modrewrite to redirect a url with querystring

    - by Alex
    I am trying to redirect an old URL that uses a query string to the new url that does not.. /tripinfo.cfm?RiverNameID=1&AdventureID=6 Now needs to go to /trips/big-ass-river/overnight.html So I am trying.. RewriteRule ^tripinfo.cfm?RiverNameID=1&AdventureID=6$ /trips/big-ass-river/overnight.html [R=301] But this is not working. . I can redirect the main page no problem using RewriteRule ^tripinfo.cfm$ /trips.html [R=301] If any one could tell me what Im missing that would be great.

    Read the article

  • How can I resolve this custom error redirect in ASP.NET

    - by D. Veloper
    I want to redirect all url errors The url I want to cath is ~/bla/foo It should redirect to ~/error404.aspx bla exists as a folder. foo does not exist. I already set the webconfig to point to my error but I just doesn't work. I get this error: Server Error in application /. -------------------------------------------------- ------------------------------ The source can not be found. Description: HTTP 404. Perhaps you are looking for the source (or a dependency thereof) removed or is temporarily unavailable or has changed its name. Check the spelling of the URL. Requested URL: / bla/foo.asox I google translate this error cuz VS here is language specific. What can I do to resolve this??? I want to point to ~/error404.aspx

    Read the article

  • Rails redirect_to jQTouch site does not work as expected

    - by tilthouse
    I have a Rails app with a jQTouch mobile site that is displayed if the user goes to m.blah.com. First, I detect the browser, then to a redirect_to m.blah.com if it's an iphone, etc. All well and good. When I use desktop Safari, this all works exactly right. However, when I use an actual iPhone or the Apple iPhone Simulator, it does not. The mobile site appears to load without the browser actually doing the redirect. The URL in the browser is still www. I am wondering if this behavior is due to Mobile Safari, or if it is somehow jQTouch trying to load the page with AJAX, not a reload (which is odd as jQTouch hasn't been loaded at all before the redirect). Any ideas?

    Read the article

  • htaccess redirect from subdomain to root

    - by Erin
    I'm hosting several domains on one account, and I currently have a RewriteRule set to redirect the root url (www.root.com) to a subdirectory (/public_html/root/). However, I have few directories in the root (/public_html/xyz/) that I would like to access from the root url (www.root.com/xyz). Is this possible to write a redirect for this, or do I have to place these folder in the /public_html/root/ directory? This is what I have for the .htaccess RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?root.com$ RewriteCond %{REQUEST_URI} !^/root/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP_HOST} ^(www.)?hamiltonmehta.com$ RewriteRule ^(/)?$ hamiltonmehta/index.php [L] Thanks in advance!

    Read the article

  • rails ajax redirect

    - by badnaam
    Here is my use case I have a search model with two actions search_set and search_show. 1 - A user loads the home page which contains a search_form, rendered via a partial (search_form). 2 - User does a search, and the request goes to search_set, the search is saved and a redirect happens to search_show page which again renders the search_form with the saved search preferences. This search form is different than the one if step1, because it's a remote form being submitted to the same action (search set) 3 - Now the user does another search, and the search form is submitted via ajax to the search_set action. The search is saved and executed and now I need to present the result via rjs templates (corresponding to search_show). I am told that if the request is xhr then I can't redirect to the search_show action? Is that right? If yes, how do I handle this? Here is my controller class http://pastie.org/993460 Thanks

    Read the article

  • Response.Redirect in HttpModule

    - by AgentHunt
    Can I do a redirect to a custom page in an HttpModule? I have an HttpModule A which executes some javascript code when any aspx page is loaded. I would like to have a server side code check to see if the clients browsers supports cookies. Can I place that code in the HttpModule A? If so, in which event? Or do I need to have a new HttpHandler for both purposes? Also, is it possible to check for cookies in an HttpModule(without a response.redirect)? All solutions I have seen need 2 pages, 1 for setting the cookie and the other for checking if the cookie has actually been created. I am hoping there should be a way to check for cookies at one place. Thanks in advance

    Read the article

  • How to Redirect Subdomains to Other Domain

    - by Codex73
    What I'm trying to accomplish with htaccess mod-rewrite: Redirect all sub-domains to new domain name w rewrite rule. e.g. test1.olddomain.com === test1.newdomain.com test2.olddomain.com === test2.newdomain.com test3.olddomain.com === test3.newdomain.com This is what I have so far which of course is wrong: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$ [NC] RewriteRule ^(.*) http://www.newdomain.com/$1 [R=301,L] RewriteRule [a-zA-Z]+\.olddomain.com$ http://$1.newdomain.com/ [R=301,L] Since I'm not a Regular Expression junkie just yet, I need your help... Thanks for any help you can give here. I know also we can compile these first two conditions into one. Note: The reason I don't redirect all domain using DNS is that a lot of directories need special rewrite rules in order to maintain positions on SEO.

    Read the article

  • URLs with query stripped of ampersands appearing in error logs

    - by Jeremy DeGroot
    I've noticed a curious phenomena popping up in my error logs recently. If, as the result of processing a form, I redirect my users to the URL http://www.example.com/index.php?foo=bar&bar=baz, I will see the following two URLs in my log http://www.example.com/index.php?foo=barbar=baz http://www.example.com/index.php?foo=bar&bar=baz The first one is obviously incorrect and will cause my application to redirect to a 404. It always appears first, usually a second before the second one. The 404 page is not doing the redirection, so it appears that the browser is trying both versions. At first, looking at my server logs made me believe it affected only Firefox 3.6.3, but I've found an example of Safari being afflicted as well. It happens fairly intermittently, though it can occur multiple times in a users' session. I've never been able to get it to happen to me. Any thoughts as to the nature of the problem or a solution?

    Read the article

  • pyramid view redirection

    - by ascobol
    This question title may be slightly incorrect but I could not find a better one (yet). I'm trying to integrate Mozilla Persona (browserid) into a Pyramid application. The login process is: user can login on any page by clicking on the login button a popup then shows a login form when the users enters correct login/password, an ajax call is made by the popup to a pyramid view that checks users credentials, and calls pyramid remember function if the check succeeded the browserid javascript code then reloads the current page Now I want to handle the case of a new user subscribing to the web app and present a new view asking for a few more details (desired username, etc) Since the "remember" function is called by an ajax call from the popup, I cannot redirect the user the the "/newuser" page. So every view needs to redirect new users to the "/newuser" url whenever the remembered browserid has no corresponding user in the database. Is there a way to intercept user requests before calling a view to call the "new_user" view instead ? Or maybe my authentication approach is fundamentally incorrect and I should rely on another approach ?

    Read the article

  • Drupal 6 Redirect automatically when selecting deepest item from a hierarchycal tree

    - by liutis
    Drupal 6, Redirect automatically when selecting deepest item from a hierarchycal tree, like: Tree Parent .|Child 1 ....|_Child 1.1 .|_Child 2 Redirect action must occour only on the last items: Child 1.1 and Child 2 Destination of creat different content types, will be defined in js array. But how to send hierarchical select value to, destination add content type? Maybe like redirect_url?tid_value=value123. I have to save all taxonomy path, but it would be enouth to get deepest one tid value. Should i use multipage approuch here? Any solusion?

    Read the article

  • Javascript alert instead of redirect in PHP mail script

    - by JCHASE11
    Thanks to Col. Shrapnel I am using a VERY basic PHP script to send emails. The form is located here. This is the script: <?php mail('[email protected]','Live Date Submission',implode("\n\n",$_POST)); header("Location: thankyou.html"); ?> When a user submits the form, they are redirected to a thankyou.html page. I want to edit the code to display a javascript alert, instead of a redirect. I don't have much PHP knowledge, so how would I edit this code to return a alert instead of a redirect?

    Read the article

  • ASP.NET MVC - How to Preserve ModelState Errors Across RedirectToAction?

    - by RPM1984
    Hi Guys, I have the following two action methods (simplified for question): [HttpGet] public ActionResult Create(string uniqueUri) { // get some stuff based on uniqueuri, set in ViewData. return View(); } [HttpPost] public ActionResult Create(Review review) { // validate review if (validatedOk) { return RedirectToAction("Details", new { postId = review.PostId}); } else { ModelState.AddModelError("ReviewErrors", "some error occured"); return RedirectToAction("Create", new { uniqueUri = Request.RequestContext.RouteData.Values["uniqueUri"]}); } } So, if the validation passes, i redirect to another page (confirmation). If an error occurs, i need to display the same page with the error. If i do return View(), the error is displayed, but if i do return RedirectToAction (as above), it loses the Model errors. I'm not surprised by the issue, just wondering how you guys handle this? I could of course just return the same View instead of the redirect, but i have logic in the "Create" method which populates the view data, which i'd have to duplicate. Any suggestions?

    Read the article

  • Redirect before rewrite

    - by Kirk Strobeck
    Had an issue where I need to redirect old URLs, but not disable the mod_rewrite for page structure. redirect 301 /home.html http://www.url.com/ It needs to live on the Symphony 2.0 .htaccess file ### Symphony 2.0.x ### Options +FollowSymlinks -Indexes <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / ### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico" RewriteCond %{REQUEST_FILENAME} favicon.ico [NC] RewriteRule .* - [S=14] ### IMAGE RULES RewriteRule ^image\/(.+\.(jpg|gif|jpeg|png|bmp))$ extensions/jit_image_manipulation/lib/image.php?param=$1 [L,NC] ### CHECK FOR TRAILING SLASH - Will ignore files RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ $1/ [L,R=301] ### ADMIN REWRITE RewriteRule ^symphony\/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^symphony(\/(.*\/?))?$ index.php?symphony-page=$1&mode=administration&%{QUERY_STRING} [NC,L] ### FRONTEND REWRITE - Will ignore files and folders RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*\/?)$ index.php?symphony-page=$1&%{QUERY_STRING} [L] </IfModule> ######

    Read the article

  • Moved X-cart site to Sub Directory - Need Help setting up Redirects

    - by Rich G
    I recently moved an x-cart site from a root directory to a sub directory, and also built a new Wordpress site under the root directory. The problem I am having is that I am trying to figure out a redorect combo that will show the search engines that the product pages are now under the sub directory (/store) but do not want the search engines to exclude the brand new site under the Root directory. I was thinking that if I could just have redirect any .html file (all of the product pages link to .html pages) that it would redirect to the same page just under the sub directory. The reason I cannot do everything one by one is because there are about 50k+ products that would need be changed. Any information and help would be greatly appreciated! Thank you in advanced!

    Read the article

  • htaccess redirect conditions

    - by user271619
    I figured out how to redirect someone, if they happen across one particular filename: Redirect /index.php http://www.website.com/#myaccount As you can see, I'm pretty much redirecting that visitor to the same page, which doesn't work. It's an endless look, regardless of the slight/minuscule change. I want to force someone to see a part of the page, by adding the hash. (it's a little weird, I know) I'm guessing this may be a time to use regex in the htaccess file. But I thought I'd ask if there's a simpler way to do this from the htaccess file.

    Read the article

  • Problems with mod_rewrite and 301 redirects from one dynamic url to another

    - by user349891
    Hey all, I'm having all kinds of problems with a bunch of apache redirects just now and could really use some help! I'm wating to put in a 301 redirect for a load of urls from a client's old site to their new site in the following format; Old - page.php?pageNum_rs_all=0&totalRows_rs_all=112 New - page/sub?foo=bar The values in the query sting for the old site don't in any way tie up to any ids or references on the new site, I only want to match that specific request and redirect to the new page. It feels like I've tried just about every combination of rewriterule I can find online but still nothing seems to be working. This is running on Apache 2.2. The rule I started with (and keep going back to) is; RewriteRule ^/page.php\?pageNum_rs_all=0&totalRows_rs_all=112 /page/sub?foo=bar [R=301,L,NE] Any help would be greatly appreciated! c.

    Read the article

  • Servlets response.sendRedirect(String url) doesn't seems to send the encoding, why?

    - by Daziplqa
    Hi folks, I have some Servlet that explicity sets the character encoding and redirect to some servlet class Servlet1 extends HttpServle{ void doGet(..... ){ // ... request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"): //...... response.redirect(servlet2); } } class Servlet2 extends HttpServle{ void doGet(..... ){ // ... request.getCharacterEncoding(); // prints null ?? why??? //...... } } So, why the character encoding not being send with the request?

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >