Search Results

Search found 19374 results on 775 pages for 'url modification'.

Page 67/775 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • DotNetOpenAuth getting return_To url as the provider

    - by Jeff
    I have a provider that I'm upgrading from version 2 to version 3. basically a user comes to one of our sites and we say "if you don't have an openID sign up with this one" They click that and are sent to our in house provider what signs them up for an account and has to verify their email address. In the link I send via Email I included the return to url . This way when they click the link to verify their email (sometimes up to a week later) they are sent to our page that knows to send them back to the returnTo to login. I could not find a good way to do this in version 2 so I used a hack. Sadly this hack broke in version 2 so I'm completely stumped as to how to find the login page url that is the return_To Note: I need the full URL not just the domain. old hack: if (ProviderEndpoint.PendingAuthenticationRequest != null) { req = ProviderEndpoint.PendingAuthenticationRequest.ToString(); int startpos = req.LastIndexOf("CheckIdRequest.ReturnTo = '"); startpos += "CheckIdRequest.ReturnTo = '".Length; int endpos = req.LastIndexOf("token=") - startpos-1; if (endpos > 0) { req = req.Substring(startpos, endpos); } else { log.Fatal("Missing token in url" + ProviderEndpoint.PendingAuthenticationRequest.ToString()); return "~/"; } req = req.Replace("&internalLogin=True", ""); req = req.Replace("?internalLogin=True&", "?"); req = req.Replace("?internalLogin=True", ""); }

    Read the article

  • Unexpected htaccess behaviour (mod_rewrite and apache)

    - by avastreg
    Yeah, mod_rewrite is driving me crazy. Here is the problem: my htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] when i try to access the page advantix (so address was www.mywebsite.com/advantix), i'm being redirected to advantix/?url=advantix Looking at the access log, i have a suspicious 301 in the middle "GET /advantix HTTP/1.1" 301 335 "-" "Mozilla/5.0" "GET /advantix/?url=advantix HTTP/1.1" 200 186 "-" "Mozilla/5.0" There is one important detail: advantix is a directory. So, if i comment that rule, advantix goes to the folder and list the files. Why it applies automatically the / if there's a folder matching? I don't want to reach the folder, i want to reach index.php?url=advantix with a call to advantix. I have the rewriteLogs too, but they didn't help more. My vhost conf has Directory tag with Options All, if helps, i don't know much about that.

    Read the article

  • Python: replace urls with title names from a string

    - by Hellnar
    Hello I would like to remove urls from a string replace them with their titles of the original contents. For example: mystring = "Ah I like this site: http://www.stackoverflow.com. Also I must say I like http://www.digg.com" sanitize(mystring) # it becomes "Ah I like this site: Stack Overflow. Also I must say I like Digg - The Latest News Headlines, Videos and Images" For replacing url to the title, I have written this snipplet: #get_title: string -> string def get_title(url): """Returns the title of the input URL""" output = BeautifulSoup.BeautifulSoup(urllib.urlopen(url)) return output.title.string

    Read the article

  • Failed to load url in Dom Document?

    - by Lakhan
    im trying to get latitude and longtitude from google map by giving address. But its giving error.when i directly copy url to browser url bar.its giving correct result.If anybody know the answer .Plz reply. Thanx in advance Here is my code. <?php $key = '[AIzaSyAoPgQlfKsBKQcBGB01cl8KmiPee3SmpU0]'; $opt = array ( 'address' => urlencode('Kolkata,India, ON') , 'output' => 'xml' ); $url = 'http://maps.google.com/maps/geo?q='.$opt['address'].'&output='.$opt['output'].'&oe=utf8&key='.$key; $dom = new DOMDocument(); $dom->load($url); $xpath = new DomXPath($dom); $xpath->registerNamespace('ge', 'http://earth.google.com/kml/2.0'); $statusCode = $xpath->query('//ge:Status/ge:code'); if ($statusCode->item(0)->nodeValue == '200') { $pointStr = $xpath->query('//ge:coordinates'); $point = explode(",", $pointStr->item(0)->nodeValue); $lat = $point[1]; $lon = $point[0]; echo '<pre>'; echo 'Lat: '.$lat.', Lon: '.$lon; echo '</pre>'; } ?> Following error has occured: Warning: DOMDocument::load(http://maps.google.com/maps/geo? q=Kolkata%252CIndia%252C%2BON&output=xml&oe=utf8&key=%5BAIzaSyAoPgQlfKsBKQcBGB01cl8KmiPee3SmpU0%5D) [domdocument.load]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in C:\xampp\htdocs\draw\draw.php on line 19 Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://maps.google.com/maps/geo?q=Kolkata%252CIndia%252C%2BON&output=xml&oe=utf8&key=%5BAIzaSyAoPgQlfKsBKQcBGB01cl8KmiPee3SmpU0%5D" in C:\xampp\htdocs\draw\draw.php on line 19 Notice: Trying to get property of non-object in C:\xampp\htdocs\draw\draw.php on line 26

    Read the article

  • How to correct this rewrite rule?

    - by Justin John
    I have url as http://www.mydomain.com/levels/home?mode=48bb6e862e54f2a795ffc4e541caed4d. I need to change this url to http://www.mydomain.com/medium. I am not familiar with rewrite url. I tried with RewriteRule ^medium/?$ levels/home?mode=48bb6e862e54f2a795ffc4e541caed4d, but not worked correctly. Full rewrite rule RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^medium/?$ levels/home?mode=48bb6e862e54f2a795ffc4e541caed4d RewriteRule ^(.*)$ index.php [QSA,L]

    Read the article

  • PHP header() redirect not working after shortening URL using bit.ly

    - by Fabian Kreiser
    Hi, I have a problem with php header redirect. I already spent hours trying to fix it. The problem doesn't occur when the bit.ly api is not used in the script, I have no clue why. <?php if (strlen($_GET['url']) > 26) { $shortenedURL = $_GET['url']; if (isset($_GET['login']) && isset($_GET['apikey'])) { $shortenedURL = file_get_contents('http://api.bit.ly/v3/shorten?format=txt&login='.urlencode($_GET['login']).'&apiKey='.$_GET['apikey'].'&uri='.urlencode($_GET['url'])); } else { $shortenedURL = file_get_contents('http://icbrd.net/shorten.php?longurl='.$_GET['url']); } if (strlen($shortenedURL) > 0) { header( 'Location: icebird://compose?status='.$shortenedURL.'%20' ); exit(); } else { header( 'Location: icebird://compose?status='.$_GET['url'].'%20' ); exit(); } } else { header( 'Location: icebird://compose?status='.$_GET['url'].'%20' ); exit(); } ?> I hope you can help me, as this is driving me crazy. Regards

    Read the article

  • Find and Replace using Perl for a dynamic url based on wordpress post

    - by user1068544
    How do you find the following div using perl. The url and image location will consistently change based on the post url, so i need to use a wild card. I must use a regular expression because I am limited in what i can use due to the software i am using. http://community.autoblogged.com/entries/344640-common-search-and-replace-patterns <div class="tweetmeme_button" style="float: right; margin-left: 10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjumpinblack.com%2F2011%2F11%2F25%2Fdrake-and-rick-ross-you-only-live-once-ep-mixtape-2011-download%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjumpinblack.com%2F2011%2F11%2F25%2Fdrake-and-rick-ross-you-only-live-once-ep-mixtape-2011-download%2F&amp;source=jumpinblack1&amp;style=compact&amp;b=2" height="61" width="50" /><br /> </a> </div> I tried using <div class="tweetmeme_button" style="float: right; margin-left: 10px;">.*<\/div>

    Read the article

  • why is the address bar black in Google chrome so you cannot see what you're typing ?

    - by Tim
    The address bar background color in Google Chrome is black. I cannot see what I'm typing. What's going on? This is a problem when you're typing in a URL you've never used before (so there's no matching history). Type in a URL you've never used before. Imagine someone is giving it to you over the phone. Make a typo somewhere. Use the back arrow to go back and correct it. You cannot see where the cursor is. This just started happening yesterday. I'm on WinXP Pro.

    Read the article

  • preg_match to find the current directory in a URL

    - by Ian
    I'm trying to detect the current section of a site that a user is viewing by checking for the final directory in the URL. I'm using a PHP and regex to do it and I think I'm close but unfortunately not quite there yet. Here's what I currently have: <?php $url = $_SERVER['REQUEST_URI_PATH'] = preg_replace('/\\?.*/', '', $_SERVER['REQUEST_URI']); $one = '/one/'; $two = '/three/'; $three = '/three/'; $four = '/four/'; $five = '/five/'; echo $url; if (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($one)) == $one) { // URI path starts with "/one/" echo "The section is one."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($two)) == $two) { // URI path starts with "/two/" echo "The section is two."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($three)) == $three) { // URI path starts with "/three/" echo "The section is three."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($four)) == $four) { // URI path starts with "/four/" echo "The section is four."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($five)) == $five) { // URI path starts with "/five/" echo "The section is five."; } ?> I've placed in the echo before the if statements just to get confirmation of the value of $url. This outputs /currentdirectory/file.php However the conditions themselves don't match anything and my individual echo for each section never displays. Also if there's a simpler way of doing it then I'm open to suggestions. Thanks

    Read the article

  • Extended URL php

    - by web.ask
    I have a problem with the extended url here in php. I'm not even sure if it's called extended url. I was wondering if someone can help me since i'm no good with PHP. I have a php page the careers.php it shows the career listing but when I click on Learn more link it goes to http(dot)localhost/houseofpatel/jobs/4/Career-4 but it outputs an "Object not found". Does xampplite have something to do with this? or is it just the codes? I also have the breadcrumb.php in here. Please see code below: session_start(); include("Breadcrumb.php"); $trail = new Breadcrumb(); $trail->add('Careers', $_SERVER['PHP_SELF'], 1); $trail -> output(); # REMOVE SPECIAL CHARACTERS $sPattern = array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'); $sReplace = array('', '-', ''); mysql_query("SET CHARACTER_SET utf8"); //$query = "SELECT * FROM careers_mst WHERE status = 1 ORDER BY dateposted DESC LIMIT 0, 4"; if(!$_GET['jobs']){ $jobsPerPage = 4; }else{ $jobsPerPage = $_GET['jobs']; } if(!$_GET['page']){ $currPage = 1; $showMoreJobs = true; }else{ $currPage = $_GET['page']; $showMoreJobs = false; } $offset = ($currPage - 1 )* $jobsPerPage; $query = "SELECT * FROM careers_mst WHERE status = 1 ORDER BY dateposted"; $process = mysql_query($query); if(@mysql_num_rows($process) > 0){ $totalRows = @mysql_num_rows($process); $query2 = "SELECT * FROM careers_mst WHERE status = 1 ORDER BY dateposted DESC LIMIT $offset, $jobsPerPage"; $process2 = mysql_query($query2); if(@mysql_num_rows($process2) > 0){ $pagNav = pageNavigator($totalRows,$jobsPerPage,$currPage,''); while($row = @mysql_fetch_array($process2)){ $id = $row[0]; $title = stripslashes($row['title']); $title1 = preg_replace($sPattern, $sReplace, $title); $description = stripslashes($row['description']); $description1 = substr($description, 0, 200); $careers_list .= ' <div class="left" style="width:340px; padding-left:10px;"> <p><span class="blue"><strong>'.$title.'</strong></span></p> '.$description1.'... <p><a href="jobs/'.$id.'/'.$title1.'" title="Learn more">[ Learn More ]</a></p> </div>'; } /*$careers_list .= ' <div class="left" style="width: 100%; margin-top:15px;"> <p><a href="more-jobs" title="More Job Opennings">MORE JOB OPENNINGS >> </a></p> <div class="divider left"></div> </div>'; */ if($showMoreJobs){ if($totalRows > $jobsPerPage){ $currPage++; } $jobNav = "<a href=careers.php?page=$currPage title='More Job Opennings'>MORE JOB OPENNINGS >> </a>"; }else{ $jobNav = "$pagNav"; } $careers_list .= "<div class='left' style='width: 100%; margin-top:15px;'> <p>$jobNav</p> <div class='divider left'></div> </div>"; } }

    Read the article

  • Nginx alias or rewrite for Horde Groupware ActiveSync URL does not process the rpc.php file

    - by Benny Li
    I'm trying to setup a Horde groupware with Nginx. The webinterface works but I do not get the ActiveSync specific URL to work. The Horde Wiki explains how to use it with an Apache Webserver here. My problem is, that I setup a rewrite (tried an alias too) to serve the location /horde/Microsoft-Server-ActiveSync via the /horde/rpc.php script. But with my current configuration nginx does the rewrite and returns a 200 status code. But it looks like that the php file is not executed. If I go to /horde/rpc.php directly it opens up the login dialog. So this seems to work correct. Firstly I was googling about the problem but could not find a working solution. So now I would like to ask you. The configuration should allow to access the ActiveSync part via the URL /horde/Microsoft-Server-ActiveSync. The horde webinterface is already accessible via /horde. My configuration looks like this: default-ssl.conf server { listen 443 ssl; ssl on; ssl_certificate /opt/nginx/conf/certs/server.crt; ssl_certificate_key /opt/nginx/conf/certs/server.key; server_name example.com; index index.html index.php; root /var/www; include sites-available/horde.conf; } horde.conf location /horde { rewrite_log on; rewrite ^/horde/Microsoft-Server-ActiveSync(.*)$ /horde/rpc.php$1 last; try_files $uri $uri/ /rampage.php?$args; location ~ \.php$ { try_files $uri =404; include sites-available/horde.fcgi-php.conf; } } horde.fcgi-php.conf include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_params (default nginx) fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param HTTPS $https if_not_empty; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; The nginx log level is set to debug. The output after the request is: 2014/06/13 10:33:15 [notice] 17332#0: *1 "^/horde/Microsoft-Server-ActiveSync(.*)$" matches "/horde/Microsoft-Server-ActiveSync", client: XX.XX.XX.XX, server: example.com, request: "GET /horde/Microsoft-Server-ActiveSync HTTP/1.1", host: "example.com" 2014/06/13 10:33:15 [notice] 17332#0: *1 rewritten data: "/horde/rpc.php", args: "", client: XX.XX.XX.XX, server: example.com, request: "GET /horde/Microsoft-Server-ActiveSync HTTP/1.1", host: "example.com" All this is happening on a RaspberryPi with Raspbian GNU/Linux 7 (which is mainly a Debian Wheezy). So I guess the rewrite works but the php file is not processed?! Does anyone know where the problem is and how to fix it?

    Read the article

  • 301 htaccess redirect: add segment to old URL's

    - by Rick
    I'm trying to make sure old url's aren't broken after the site's URL structure has changed from this: http://www.domain.com/section/entry_name to this: http://www.domain.com/section/event_name/entry_name But to make it a bit more complex, I'm using the segments to sort entries, for example: http://www.domain.com/news/amazing_event/date/asc http://www.domain.com/videos/my_event/title/desc The new structure only effects one particular event (amazing_event) and should leave the other URL's alone. Where do I even begin to tackle this? My current .htaccess looks like: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] Thanks - appreciate any tips.

    Read the article

  • Javascript regex URL matching

    - by Blondie
    I have this so far: chrome.tabs.getSelected(null, function(tab) { var title = tab.title; var btn = '<a href="' + tab.url + '" onclick="save(\'' + title + '\');"> ' + title + '</a>'; if(tab.url.match('/http:\/\/www.mydomain.com\/version.php/i')) { document.getElementById('link').innerHTML = '<p>' + btn + '</p>'; } }); Basically it should match the domain within this: http://www.mydomain.com/version.php?* Anything that matches that even when it includes something like version.php?ver=1, etc When I used the code above of mine, it doesn't display anything, but when I remove the if statement, it's fine but it shows on other pages which it shouldn't only on the matched URL.

    Read the article

  • Facebook Application Tab URL

    - by Paul
    I have a facebook application that can be added to fan pages as a tab. The application requires that users are authenticated in order to use it. This can be accomplished by using requirelogin=1 in a link which is visible only to users who have NOT added the application. This part works fine. However, after the user has given my application permission from the dhtml pop up that requirelogin opens, I want the tab to reload. In order to do that, I need the full URL to be included in the link as follows: <a href="http://www.facebook.com/pages/PAGE_NAME/PAGE_ID?v=app_APP_ID" requirelogin=1>Authorize</a> I cannot figure out how to get the full url or, at least, the PAGE_NAME to build this url dynamically. Seems like the app should be able to know where it is without any special permissions.

    Read the article

  • How to redirect wordpress post links that are using post_id to new url struture of postname

    - by Matthew
    Hey guys, I have a slight problem... we made a change to our url structure the other day and have broken links all over. What I did was change links from: http://blog.mydomain.com/articles/123 To: http://blog.mydomain.com/articles/this-is-a-smaple Is there anyway to direct any links linking to the pages ID number to the postname???? The old url structure is still being published throughout our RSS feed on facebook. So I am trying to catch those people that are or maybe clicking on our links on our facebook posts and redirect them to that posts postname url? Does that make sense? Thanks and help would do

    Read the article

  • Allowing asterisk in URL - ASP.NET MVC 2 - .NET 4.0 or encoding

    - by raRaRa
    I'm having a trouble allowing asterisk (*) in the URL of my website. I am running ASP.NET MVC 2 and .NET 4.0. Here's an example that describes the problem: http://mysite.com/profile/view/Nice* The username is Nice* and ASP.NET says there are illegal characters in the URL: Illegal characters in path. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Illegal characters in path. I have tried all the Web.config methods I've seen online such as: <pages validateRequest="false"> and <httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" /> So my question is: Is it possible to allow asterisk in URL? If not, is there some encoding method in .NET that can encode asterisk(*) ? Thanks!

    Read the article

  • dynamically getting base url inside js file

    - by uzay95
    I eant to run function inside web service (.asmx file) $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: '/Admin/WebSrvcs/Management.asmx/f_SearchLabel', data: "{_sQuery:'" + obj.value + "'}", dataType: "json", But I don't know where will be my root url(http://localhost:4399/VirDir or something else it may be) address inside js file. And i need to reach root folder of application to find asmx file. $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: 'http://localhost:4399/virDir/Admin/WebSrvcs/Management.asmx/f_SearchLabel', data: "{_sQuery:'" + obj.value + "'}", dataType: "json", I am working on Visual Studio 2008 and building web site with C#. any help would be greatly appreciated

    Read the article

  • Expose url to webservice

    - by Patrick Peters
    In our project we want to query a document management system for a specific document or movie. The dms returns a URL with the document location (for example: http://mydomain.myserver1.share/mypdf.pdf or http://mydomain.myserver2.share/mymovie.avi). We want to expose the document to internet users and intranet users. The requested file can be large (large video files). Our architecture is like: request goes like: webapp1 - webapp2 - webapp3 - dms response goes like: dms - webapp3 - webapp2 - webapp1 webapp1 could be on the internet. I have have been thinking how we can obfusicate the real url from the dms, due to security issues. I have seen implementations from other webapps where the pdf URL was obfusicated by creating a temp file for the requested document that is specific for the session and user. So other users cannot easily guess the documentname of other users. My question: is there a pattern that deals with exposing company/user vulernable data to the public ? Our development is in C# 3.5.

    Read the article

  • how to add shopping cart url under top links in magento through customer.xml

    - by Ela
    I tried a lot to add shopping cart url in magento please show me how to add shopping cart url under top links in magento through customer.xml i did in this way. <default> <!-- Mage_Customer --> <reference name="top.links"> <action method="addLink" translate="label title" module="checkout"><label>Shopping Cart</label><url helper="checkout/getShoppingCartUrl"/><title>Shopping Cart</title><prepare/><urlParams/><position>10</position></action> </reference> </default>

    Read the article

  • JQuery preventDefault() but still add the fragment path to the URL without navigating to the fragment

    - by jdln
    My question is similar to this one but none of the answers solve my problem: Use JQuery preventDefault(), but still add the path to the URL When a user clicks a fragment link, I need to remove the default behaviour of jumping to the fragment but still add the fragment to the URL. This code (taken from the link) will fire the animation, and then add the fragment to the URL. However the fragment is then navigated to, which im my case breaks my site. $("#login_link").click(function (e) { e.preventDefault(); $("#login").animate({ 'margin-top': 0 }, 600, 'linear', function(){ window.location.hash = $(this).attr('href'); }); });

    Read the article

  • ASP.NET: images broken when combining URL Rewriting, asp:ImageButton and html base tag

    - by Nick G
    Hi, I'm using URL Rewriting under ASP.NET 4 (using ISAPI_Rewrite) and I'm finding that that some of my images are not loading as .NET does not seem to understand I'm using an html BASE tag (pretty standard and essential when doing URL Rewriting): eg in my development environment I have: <base href='http://localhost/venuefinder/Website/'></base> and on my pages I have: <asp:ImageButton runat="server" ImageUrl="~/images/button.gif" /> On the home page of the site (http://localhost/venuefinder/Website/) this works fine, however on a page that uses URL rewriting, the image does not work: /venuefinder/Website/venues/ashton_gate_stadium/V18639/ ..as the browser is trying to load: http://localhost/images/buttons/search-button.gif instead of: http://localhost/venuefinder/Website/venues/images/buttons/search-button.gif This is happening because .NET is rendering the button as: src="../../../images/buttons/search-button.gif" ...which is incorrect. Is there any way I can correct this problem so that .NET renders the correct src attribute for the image? (without all the ../../../ etc)

    Read the article

  • Is url.openStream harmful?

    - by Casebash
    I was using the java.net.URL.openStream() method to retrieve content from the server. I recently ran into an issue where the HTTP Response code indicated an error, but instead of throwing an exception, the stream still was read anyway. This caused the error to appear much later in the execution and proved to be a red herring. As far as I can see, when you have opened a stream using this method, there is no way to check the HTTP response code. The only way I could find to handle this properly was to use code such as: HttpURLConnection conn=(HttpURLConnection) url.openConnection() if(conn.getResponseCode()!=HttpStatus.SC_OK) //Raise Exception; InputStream in=conn.getInputStream() So do you agree? Is it possible to use openStream safely, or is it a method that should be avoided at all costs. It is worth noting that Sun uses the method in their tutorial code for reading directly from a URL. Then again, the code throws Exception so it isn't exactly a bastion of good coding practices.

    Read the article

  • MVC ActionLink generating NON-Restul URL AFTER adding constraints

    - by brianstewey
    Hello I have a custom route that without constraints generates a Restful URL with an ActionLink. Route - routes.MapRoute( "Blog", // Route name "Blog/{d}/{m}/{y}", // URL with parameters, new { controller = "Blog", action = "Retrieve" } Generates - http://localhost:2875/Blog/12/1/2010 From - <%=Html.ActionLink("Blog Entry - 12/01/2010", "Retrieve", "Blog", new { d = 12, m = 01, y = 2010 }, null)%> If I add constraints like so. routes.MapRoute( "Blog", // Route name "Blog/{d}/{m}/{y}", // URL with parameters, new { controller = "Blog", action = "Retrieve" }, new { d = @"\d{2}", m = @"\d{2}", y = @"\d{4}" } It generates - http://localhost:2875/Blog/Retrieve?d=12&m=1&y=2010 Extra information: it is added before the custom route. Any ideas? Cheers

    Read the article

  • Upgrade URL for SEO from mysite.com/dbtable_id/ to mysite.com/dbtable_id/article-title

    - by John
    I have an existing journal website with the following url structure http://mysite.com/dbtable_id/ (eg. http://mysite.com/89348/) where 89348 is the primary key id of the journal article. I want to add the title of the article to the url for SEO purposes like http://mysite.com/dbtable_id/article-title (eg. http://mysite.com/89348/hello-world) I like this approach because I don't need to change the PHP code since it will still look up the article by dbtable_id. All I have to do is append url friendly titles to relevant links in template files and add one more rule to a .htaccess file. Is there anything I should be concerned about? Am I following best practices? Will the possibility for mismatch between "dbtable_id" and "article-title" affect SEO?

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >