Search Results

Search found 21350 results on 854 pages for 'url parsing'.

Page 23/854 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Apache2 URL Rewrite - Second-Level-Domain to the end of URL

    - by Acryl
    i have a site "example.com" and also many other domains like "example1.com", "example2.de", etc. I want that every Second-Level-Domain is rewritten in the following way: example.com/domainredirect=example1.com (when you open example1.com) and example.com/domainredirect=example2.de (when you open example2.de) So the original Second-Level-Domain should be rewritten after "example.com/domainredirect=" Thanks in advance

    Read the article

  • IIS URl Rewrite working inconsistently?

    - by Don Jones
    I'm having some oddness with the URL rewriting in IIS 7. Here's my Web.config (below). You'll see "imported rule 3," which grabs attempts to access /sitemap.xml and redirects them to /sitemap/index. That rule works great. Right below it is imported rule 4, which grabs attempts to access /wlwmanifest.xml and redirects them to /mwapi/wlwmanifest. That rule does NOT work. (BTW, I do know it's "rewriting" not "redirecting" - that's what I want). So... why would two identically-configured rules not work the same way? Order makes no different; Imported Rule 4 doesn't work even if it's in the first position. Thanks for any advice! EDIT: Let me represent the rules in .htaccess format so they don't get eaten :) RewriteEngine On # skip existing files and folders RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] # get special XML files RewriteRule ^(.*)sitemap.xml$ /sitemap/index [NC] RewriteRule ^(.*)wlwmanifest.xml$ /mwapi/index [NC] # send everything to index RewriteRule ^.*$ index.php [NC,L] The "sitemap" rewrite rule works fine; the 'wlwmanifest' rule returns a "not found." Weird.

    Read the article

  • Redirect with .htacess - URL with regex to URL

    - by nicorellius
    I have a temporary need to redirect some installer files on my web site. The redirects that are working now look something like this: Redirect 301 /installer_1.0.0.zip http://www.example.com/download/installer_1.0.3.zip Redirect 301 /installer_1.0.1.zip http://www.example.com/download/installer_1.0.3.zip Redirect 301 /installer_1.0.2.zip http://www.example.com/download/installer_1.0.3.zip I would like to use a regex instead of having multiple lines for each version I need to redirect. I have tried these options with no success: Redirect 301 /installer_(.*).zip http://www.example.com/download/installer_1.0.3.zip Redirect 301 /installer_([0-9+]\.[0-9+]\.[0-9+]).zip http://www.example.com/download/installer_1.0.3.zip Should these work or am I doing something wrong? Thanks.

    Read the article

  • How to configure IIS 7.5 to allow special chars in Url for ASP.NET 3.5?

    - by Sebastian P.R. Gingter
    I'm trying to configure my IIS 7.5 to allow specials chars in the url for ASP.NET. This is important to support wide-spread legacy url's on a new system. Sample url: http://mydomain.com/FileWith%inTheName.html This would be encoded in the url and requested as http://mydomain.com/FileWith25%inTheName.html This simply works, when creating a new web in IIS 7.5, placing a file with the percentage sign in the file name in the web root and pointing the browser to it. This does not work, however, when the web site is an ASP.NET application. ASP.NET always returns a 400.0 - Bad Request error in the WindowsAuthentication module from the StaticFile handler, when pointing to that url. It however displays the requested url correctly and also resolves correctly to the correct physical file (the information from the field 'Physical Path' from the Server error page points to the physically available file). There are hints on how to enable this, so I followed the instructions on these websites step by step: http://dirk.net/2008/06/09/ampersand-the-request-url-in-iis7/ http://adorr.net/2010/01/configure-iis-to-accept-url-with-special-characters.html The second one actually sums up the information from the first post and adds some more information about x64 systems (we're running x64) and on an additional web.config change for this. I tried all that, and still can't get this running from an asp.net web application. And yes: I rebooted after applying the registry changes. So, what do I have to do in addition to the settings described in above posts, to support the legacy url's which contain percentage characters? Additional info: Application Pool mode is integrated. Push after some days. No idea anyone?

    Read the article

  • nginx- Rewrite URL with Trailing Slash

    - by Bryan
    I have a specialized set of rewrite rules to accommodate a mutli site cms setup. I am trying to have nginx force a trailing slash on the request URL. I would like it to redirect requests for domain.com/some-random-article to domain.com/some-random-article/ I know there are semantic considerations with this, but I would like to do it for SEO purposes. Here is my current server config. server { listen 80; server_name domain.com mirror.domain.com; root /rails_apps/master/public; passenger_enabled on; # Redirect from www to non-www if ($host = 'domain.com' ) { rewrite ^/(.*)$ http://www.domain.com/$1 permanent; } location /assets/ { expires 1y; rewrite ^/assets/(.*)$ /assets/$http_host/$1 break; } # / -> index.html if (-f $document_root/cache/$host$uri/index.html) { rewrite (.*) /cache/$host$1/index.html break; } # /about -> /about.html if (-f $document_root/cache/$host$uri.html) { rewrite (.*) /cache/$host$1.html break; } # other files if (-f $document_root/cache/$host$uri) { rewrite (.*) /cache/$host$1 break; } } How would I modify this to add the trailing slash? I would assume there has to be a check for the slash so that you don't end up with domain.com/some-random-article//

    Read the article

  • nginx- Rewrite URL with Trailing Slash

    - by Bryan
    I have a specialized set of rewrite rules to accommodate a mutli site cms setup. I am trying to have nginx force a trailing slash on the request URL. I would like it to redirect requests for domain.com/some-random-article to domain.com/some-random-article/ I know there are semantic considerations with this, but I would like to do it for SEO purposes. Here is my current server config. server { listen 80; server_name domain.com mirror.domain.com; root /rails_apps/master/public; passenger_enabled on; # Redirect from www to non-www if ($host = 'domain.com' ) { rewrite ^/(.*)$ http://www.domain.com/$1 permanent; } location /assets/ { expires 1y; rewrite ^/assets/(.*)$ /assets/$http_host/$1 break; } # / -> index.html if (-f $document_root/cache/$host$uri/index.html) { rewrite (.*) /cache/$host$1/index.html break; } # /about -> /about.html if (-f $document_root/cache/$host$uri.html) { rewrite (.*) /cache/$host$1.html break; } # other files if (-f $document_root/cache/$host$uri) { rewrite (.*) /cache/$host$1 break; } } How would I modify this to add the trailing slash? I would assume there has to be a check for the slash so that you don't end up with domain.com/some-random-article//

    Read the article

  • How to Redirect from One URL to Another Showing the New URL

    - by Ngu Soon Hui
    I have an old domain www.olddomain.com, and now I have shifted my content to www.newdomain.com. Both of the domains are residing in the same root folder on a sharehost. I use CPanel to manage them. Now, when the user types in www.olddomain.com, I want it to be redirected to www.newdomain.com, with the address bar showing www.olddomain.com. How to do this in cpanel? I tried to use "redirects" feature in Domains list, and although I could get the redirection, but the address bar showed www.newdomain.com, not www.olddomain.com. Any idea?

    Read the article

  • how can multiple trailing slashes can be removed from an url in Ruby

    - by splintercell
    Hello, What i'm trying to achieve here is lets say we have two example urls: url1 "http://emy.dod.com/kaskaa/dkaiad/amaa//////////" & url2 = "http://www.example.com/". How can I extract the striped down urls? url1 : "http://emy.dod.com/kaskaa/dkaiad/amaa" & url2 to "http://http://www.example.com"? URI.parse in ruby sanitizes certain type of malformed url but is ineffective in this case. If we use regex then /^(.*)\/$/ removes a single slash (/) from url1 & is ineffective for url2. Is anybody aware of how to handle this type of url parsing? The point here is I dont want my system to have "http://www.example.com/" & "http://www.example.com" being treated as two different urls. And same goes for "http://emy.dod.com/kaskaa/dkaiad/amaa////" & "http://emy.dod.com/kaskaa/dkaiad/amaa/" cheers, -dg

    Read the article

  • An Intro to IIS URL Rewrite–plus redirecting URLs to www-Web Pro Week 8 of 52

    - by OWScott
    Today’s video post is an intro to URL Rewrite and the start of a few lessons on this powerful tool.  Additionally I cover how to rewrite URLs to add the www to the domain name for the sake of search engine optimization (SEO). This is week 8 of a 52 week series on various web administration related tasks.  Past and future videos can be found here. I have already written a blog post on this, so for those that prefer to read rather than watch, you can find it here. IIS URL Rewrite–redirecting non-www to www

    Read the article

  • How does one use the built in IIS URL Rewrite SEO rule that adds trailing slash only to files that exist?

    - by Sn3akyP3t3
    The default rule template is AddTrailingSlash. I've added another condition that allows the rule to apply to directories and not files, but I'm not sure if this is industry standard. Added: The rule allows for filename that are not standard such as .mobileconfig The web.config contains this rule when the template is applied: <rule name="AddTrailingSlashRule1" enabled="true" stopProcessing="true"> <match url="(.*[^/])$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" pattern="^.*\.[a-z]{1,12}" negate="true" /> </conditions> <action type="Redirect" url="{R:1}/" /> </rule>

    Read the article

  • Is there a way I can filter traffic by page-type based upon URL structure in Google-Analytics or Google Webmaster Tools?

    - by Felix
    I have a local business directory site. I'm trying to segment my incoming traffic by page-type such that I can find out what percentage of traffic is going to zip code pages exclusively and what percentage is going to city/state level pages. I basically want to filter by URL structure to find out what percentage of total traffic zip code pages account for. The reason for doing this is to find out if Google Tag Manager can help with this? Here are the two URL paths: http://www.example.com/ny/new-york/10011/ http://www.example.com/ny/new-york

    Read the article

  • Is there a way I can sort traffic by page-type based upon URL structure in Google-Analytics or Google Webmaster Tools??

    - by Felix
    I have a local business directory site. I'm trying to segment my incoming traffic by page-type such that i can find out what percentage of traffic is going to zip code pages exclusively and what percentage is going to city/state level pages. I basically want to filter by URL structure to find out what percentage of total traffic zip code pages account for. The reason for doing this is to find out if Does Google Tag Manager help with this? Here are the two URL paths: http://www.example.com/ny/new-york/10011/ http://www.example.com/ny/new-york Thanks all!

    Read the article

  • SEO and JavaScript since Google admits JS parsing

    - by schlingel
    We're planning on building a HTML snapshot creation service to provide the Google crawlers with static HTML of our JS driven single page application. Is this still necessary and/or encouraged since Google openly admits it is parsing JS now? How should I tackle this evaluation? Are there tools to provide data on when it's needed to provide snapshots and when google has sufficent parsing? Is it better because it would be much faster in comparison to the JS incremental rendering?

    Read the article

  • Keep IIS 7 URL Rewrite module from matching /ScriptResource.axd

    - by D.R. Payne
    I have a website and I have installed URL Rewrite using Web Platform Installer. I wish to allow a user friendly URL like www.foo.com/123456 to go to www.foo.com/page.aspx?blah=123456. Using the User-friendly URL template accomplishes this except that the created rule also matches all of the /scriptresource.axd?blahblah created by ASP.NET which of course breaks most functionality. My initial attempts to exclude the script resource files have failed. The regex generated by the tool is ^([^/]+)/?$

    Read the article

  • Intelligencia URL ReWriter mapping with regex

    - by alex
    I am using the Intelligencia URL rewriter in my asp.net web application. I use the web.config mappings I'm trying to map the following url: www.mydomain.com/product-deals/manufacturer-model_PRODUCTId.aspx To: www.mydomain.com/ProductInfo.aspx?productID=xxx obviously in the above example, xxx is replaced from the "productId" from the "friendly" url. In my web.config, I've got so far: <rewrite url="~/contract-deals/([\w-_]+)/_(.+).aspx" to="~/ProductInfo.aspx?productId=$1"/> This isn't working however. I need the correct regex to use for my requirements (regex really isn't my strong point!!)

    Read the article

  • URL detection with JavaScript

    - by josh
    Hi! I'm using the following script to force a specific page - when loaded for the first time - into a (third-party) iFrame. <script type="text/javascript"> if(window.top==window) { location.reload() } else { } </script> (For clarification: This 'embedding' is done automatically by the third-party system but only if the page is refreshed once - for styling and some other reasons I want it there from the beginning.) Right now, I'm wondering if this script could be enhanced in ways that it's able to detect the current URL of its 'parent' document to trigger a specific action? Let's say the URL of the third-party site is 'http://cgi.site.com/hp/...' and the URL of the iFrame 'http://co.siteeps.com/hp/...'. Is it possible to realize sth. like this with JS: <script type="text/javascript"> if(URL is 'http://cgi.site.com/hp/...') { location.reload() } if(URL is 'http://co.siteeps.com/hp/...') { location.do-not.reload() resp. location.do-nothing() } </script> TIA josh

    Read the article

  • getting base url of web site's root (absolute/relative url)

    - by uzay95
    I want to completely understand how to use relative and absolute url address in static and dynamic files. ~ : / : .. : in a relative URL indicates the parent directory . : refers to the current directory / : always replaces the entire pathname of the base URL // : always replaces everything from the hostname onwards This example is easy when you are working without virtual directory. But i am working on virtual directory. Relative URI Absolute URI about.html http://WebReference.com/html/about.html tutorial1/ http://WebReference.com/html/tutorial1/ tutorial1/2.html http://WebReference.com/html/tutorial1/2.html / http://WebReference.com/ //www.internet.com/ http://www.internet.com/ /experts/ http://WebReference.com/experts/ ../ http://WebReference.com/ ../experts/ http://WebReference.com/experts/ ../../../ http://WebReference.com/ ./ http://WebReference.com/html/ ./about.html http://WebReference.com/html/about.html I want to simulate a site below, like my project which is working on virtual directory. These are my aspx and ascx folder http://hostAddress:port/virtualDirectory/MainSite/ASPX/default.aspx http://hostAddress:port/virtualDirectory/MainSite/ASCX/UserCtrl/login.ascx http://hostAddress:port/virtualDirectory/AdminSite/ASPX/ASCX/default.aspx These are my JS Files(which will be use both with the aspx and ascx files): http://hostAddress:port/virtualDirectory/MainSite/JavascriptFolder/jsFile.js http://hostAddress:port/virtualDirectory/AdminSite/JavascriptFolder/jsFile.js this is my static web page address(I want to show some pictures and run inside some js functions): http://hostAddress:port/virtualDirectory/HTMLFiles/page.html this is my image folder http://hostAddress:port/virtualDirectory/Images/PNG/arrow.png http://hostAddress:port/virtualDirectory/Images/GIF/arrow.png if i want to write and image file's link in my ASPX file i should write aspxImgCtrl.ImageUrl = Server.MapPath("~")+"/Images/GIF/arrow.png"; But if i want to write the path hard coded or from javascript file, what kind of url address it should be?

    Read the article

  • Fast, lightweight HTML parser for C++

    - by Jen
    I'm looking for a fast, lightweight open-source HTML parser -- something along the lines of a non-validating SAX parser (except, of course, for HTML). The answers to this question cover a parser that generates a DOM (don't want that), and these answers suggest conforming the HTML to XML before sending it to Xerxes (can't do that in my case). Any suggestions?

    Read the article

  • jquery, Regexp, make dynamic url

    - by Alexander Corotchi
    Hi , I need a regexp help, because for me it will take a lot of time , for you some minutes:) I have youtube a URL : http://www.youtube.com/watch?v=9_Hd8hXhg7o&feature=youtube_gdata I can't add this in embed object , for embed I have to change in this URL : http://www.youtube.com/v/9_Hd8hXhg7o&hl=en_US&fs=1& It means, that I want to add the youtube cod in some variable, something like this var url = after regexp "9_Hd8hXhg7o"; "http://www.youtube.com/v/" + url +"&hl=en_US&fs=1&"; thanks !

    Read the article

  • handleOpenURL not called using a custom url schema in iPhone OS

    - by favo
    Hi, I have successfuly added my own url schemes to my App. The App correctly launches using the schemes. Now I want to handle the incoming data but the delegate is not called. It is an universal app and I have added the following function to both AppDelegates: - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { if (!url) { return NO; } NSString *URLString = [url absoluteString]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"test message", nil) message:URLString delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil]; [alert show]; [alert release]; return YES; } I am testing with a schema like: myapp://appalarm.com …and would expect to be appalarm.com in the URLString What is wrong with it? Thanks for your responses!

    Read the article

  • Haskell Parse Paragraph and em element with Parsec

    - by Martin
    I'm using Text.ParserCombinators.Parsec and Text.XHtml to parse an input like this: this is the beginning of the paragraph --this is an emphasized text-- and this is the end\n And my output should be: <p>this is the beginning of the paragraph <em>this is an emphasized text</em> and this is the end\n</p> This code parses and returns an emphasized element em = do{ ;count 2 (char '-') ; ;s <- manyTill anyChar (count 2 (char '-')) ;return (emphasize << s) } But I don't know how to get the paragraphs with emphasized items Any ideas? Thanks!!

    Read the article

  • DateTime: Require the user to enter a time component

    - by Heinzi
    Checking if a user input is a valid date or a valid "date + time" is easy: .NET provides DateTime.TryParse (and, in addition, VB.NET provides IsDate). Now, I want to check if the user entered a date including a time component. So, when using a German locale, 31.12.2010 00:00 should be OK, but 31.12.2010 shouldn't. I know I could use DateTime.TryParseExact like this: Dim formats() As String = {"d.M.yyyy H:mm:ss", "dd.M.yyyy H:mm:ss", _ "d.MM.yyyy H:mm:ss", "d.MM.yyyy H:mm:ss", _ "d.M.yyyy H:mm", ...} Dim result = DateTime.TryParseExact(userInput, formats, _ Globalization.CultureInfo.CurrentCulture, ..., result) but then I would hard-code the German format of specifying dates (day dot month dot year), which is considered bad practice and will make trouble should we ever want to localize our application. In addition, formats would be quite a large list of all possible combinations (one digit, two digits, ...). Is there a more elegant solution?

    Read the article

  • Code Golf: Evaluating Mathematical Expressions

    - by Noldorin
    Challenge Here is the challenge (of my own invention, though I wouldn't be surprised if it has previously appeared elsewhere on the web). Write a function that takes a single argument that is a string representation of a simple mathematical expression and evaluates it as a floating point value. A "simple expression" may include any of the following: positive or negative decimal numbers, +, -, *, /, (, ). Expressions use (normal) infix notation. Operators should be evaluated in the order they appear, i.e. not as in BODMAS, though brackets should be correctly observed, of course. The function should return the correct result for any possible expression of this form. However, the function does not have to handle malformed expressions (i.e. ones with bad syntax). Examples of expressions: 1 + 3 / -8 = -0.5 (No BODMAS) 2*3*4*5+99 = 219 4 * (9 - 4) / (2 * 6 - 2) + 8 = 10 1 + ((123 * 3 - 69) / 100) = 4 2.45/8.5*9.27+(5*0.0023) = 2.68... Rules I anticipate some form of "cheating"/craftiness here, so please let me forewarn against it! By cheating, I refer to the use of the eval or equivalent function in dynamic languages such as JavaScript or PHP, or equally compiling and executing code on the fly. (I think my specification of "no BODMAS" has pretty much guaranteed this however.) Apart from that, there are no restrictions. I anticipate a few Regex solutions here, but it would be nice to see more than just that. Now, I'm mainly interested in a C#/.NET solution here, but any other language would be perfectly acceptable too (in particular, F# and Python for the functional/mixed approaches). I haven't yet decided whether I'm going to accept the shortest or most ingenious solution (at least for the language) as the answer, but I would welcome any form of solution in any language, except what I've just prohibited above! My Solution I've now posted my C# solution here (403 chars). Update: My new solution has beaten the old one significantly at 294 chars, with the help of a bit of lovely regex! I suspected that this will get easily beaten by some of the languages out there with lighter syntax (particularly the funcional/dynamic ones), and have been proved right, but I'd be curious if someone could beat this in C# still. Update I've seen some very crafty solutions already. Thanks to everyone who has posted one. Although I haven't tested any of them yet, I'm going to trust people and assume they at least work with all of the given examples. Just for the note, re-entrancy (i.e. thread-safety) is not a requirement for the function, though it is a bonus. Format Please post all answers in the following format for the purpose of easy comparison: Language Number of characters: ??? Fully obfuscated function: (code here) Clear/semi-obfuscated function: (code here) Any notes on the algorithm/clever shortcuts it takes.

    Read the article

  • XML url link in Flash

    - by Vickyboy
    Hi, I am new to XML and am having a small problem in Flash. I have a number of buttons. Each of these buttons need to open up a different URL which is in a xml file (I have added only one button for now (banstead), as I wasn´t sure how to add more). My XML: <?xml version="1.0" encoding="utf-8"?> <banstead targ="_self" href="http://www.marca.com"> </banstead> My AS: weblinkXML = new XML(); weblinkXML.ignoreWhite = true; weblinkXML.load("xml/counties.xml"); weblinkXML.onLoad = function (success) { var url = weblinkXML.firstChild.attributes.href; banstead.onRelease = function () { getURL(weblinkXML.url); } } For some reason when I test the movie and click on the button it doesn´t open the URL I requested. Appreciate any help

    Read the article

  • Regex to parse a multiline HTML

    - by dreamer
    am trying to parse a multi-line html file using regex. HTML code: < td>Details< /td> < /tr> < tr class=d1> < td>uss_vod_translator< /td> Regex Expression: if ($line =~ m/Details<\/td>\s*<\/tr>\s*<tr\s*class=d1>\s*<td>(\w*)<\/td>/) { print "$1"; } I am using /s* (space) for multi-line, but it is not working. I searched about it, even used /\? for multi-line but that too did not work. Can any one please suggest me how to parse a multiline HTML?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >