Search Results

Search found 19109 results on 765 pages for 'canonical url'.

Page 6/765 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Generate canonical / real URL based on base.href or location

    - by blueyed
    Is there a method/function to get the canonical / transformed URL, respecting any base.href setting of the page? I can get the base URL via (in jQuery) using $("base").attr("href") and I could use string methods to parse the URL meant to being made relative to this, but $("base").attr("href") has no host, path etc attributes (like window.location has) manually putting this together is rather tedious E.g., given a base.href of "http://example.com/foo/" and a relative URL "/bar.js", the result should be: "http://example.com/bar.js" If base.href is not present, the URL should be made relative to window.location. This should handle non-existing base.href (using location as base in this case). Is there a standard method available for this already? (I'm looking for this, since jQuery.getScript fails when using a relative URL like "/foo.js" and BASE tag is being used (FF3.6 makes an OPTIONS request, and nginx cannot handle this). When using the full URL (base.href.host + "/foo.js", it works).)

    Read the article

  • django username in url, instead of id

    - by dana
    Hello, in a mini virtual community, i have a profile_view function, so that i can view the profile of any registered user. The profile view function has as a parameter the id of the user wich the profile belongs to, so that when i want to access the profile of user 2 for example, i call it like that: http://127.0.0.1:8000/accounts/profile_view/2/ My problem is that i would like to have the username in the url, and NOT the id. I try to modify my code as follows, but it doesn't work still. Here is my code: view: def profile_view(request, user): u = User.objects.get(pk=user) up = UserProfile.objects.get(created_by = u) cv = UserProfile.objects.filter(created_by = User.objects.get(pk=user)) blog = New.objects.filter(created_by = u) replies = Reply.objects.filter(reply_to = blog) vote = Vote.objects.filter(voted=blog) following = Relations.objects.filter(initiated_by = u) follower = Relations.objects.filter(follow = u) return render_to_response('profile/publicProfile.html', { 'vote': vote, 'u':u, 'up':up, 'cv': cv, 'ing': following.order_by('-date_initiated'), 'er': follower.order_by('-date_follow'), 'list':blog.order_by('-date'), 'replies':replies }, context_instance=RequestContext(request)) and my url: urlpatterns = patterns('', url(r'^profile_view/(?P<user>\d+)/$', profile_view, name='profile_view'), thanks in advance!

    Read the article

  • URL Rewrite is adding HTTPS to my canonical redirects in IIS7

    - by Derek Hunziker
    Hello, I have the following rule defined in my Web.config: <rule name="Enforce canonical hostname" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" negate="true" pattern="^www\.mydomain\.org$" /> </conditions> <action type="Redirect" url="http://www.mydomain.com/" redirectType="Permanent" /> </rule> What I am experiencing is strange... It appears that I am being redirected to https://www.mydomain.com/ which causes my browser to hang. I do not have SSL encryption turned on, nor do I have any special authorization rules. The web server in question is behind an F5 load balancer. Any ideas?

    Read the article

  • Removing .html and index.html from URL

    - by James Turner
    I'm having some problems trying to Remove the .html extension from URLs Removing 'index.html' from an URL 1) To remove the extension I have tried using this in my htaccess file. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html However when I click links in my HTML such as <a href="abcde.html"></a> it doesn't remove the .html from the URL and I am left with www.website.com/abcde.html 2) I tried using this to remove the index.html RewriteCond %{THE_REQUEST} \/index\.(php|html)\ HTTP [NC] RewriteRule (.*)index\.(php|html)$ /$1 [R=301,L] But when I load an index.html file on my server, my URL looks something like this www.website.com/folder// I am left with an extra / at the end. Can anyone help me out?

    Read the article

  • Website URL layout & structure for SEO & PR

    - by Junaid Saeed
    i have already mastered the skills of building a page to comply with SEO requirements. What i want to do is customize the URL based parameters for best SEO & PR. I run wallpapers blog wallz which provides different resolution desktop wallpapers I am thinking about expanding the site to provide wallpapers for multiple devices like iphone, android, pc etc etc My goal is to provide users ease by detecting their devices and directing them to the relative portion of site, keeping that in mind also keep my URLs in a SEO friendly manner. i have the following two options for my URL structure wallpapers.com \ iphone \ **or** iphone . wallpapers . com wallpapers.com \ galaxyS3 \ **or** galaxys3 . wallpapers . com subdomain or subfolders, which one is a better option, i will separate interfaces for ever subdomain\subfolder basing on the specific device. And after this the URL structure will be like wallpapers.com \ galaxyS3 \ Cars \ Ferrai 550 . html galaxys3.wallpapers.com \ Cars \ Ferrai 550 . html what is the better way for me to proceed in

    Read the article

  • Need a generic way to create SEO friendly URL

    - by Fawad Ghafoor as Xainee Khan
    I have searched a lot and implemented many many Regular Expression in my .htaccess file but can not succeed. How do I find a generic way that make my URL SEO friendly? Currently this is in my .htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?page=$1 [L,QSA] What I need to do is that I have a URL like this: http://localhost/abc/index.php?page=boats_for_sale I need to change it to http://localhost/abc/boats_for_sale Similarly, I want to hide all query strings in my URL. How would I achieve it?

    Read the article

  • Worth changing the URL structure to incorporate keywords?

    - by Dejan Pelzel
    I am migrating my blog from PHP to ASP.NET and while recoding the whole website, I figured I might as well improve the URL structure. This is how an url looks like now: example.com/blog/post/755/hakurei-reimu-cosplay-from-touhou-by-kishigami-hana and this is hould it will look after the change (cosplay being the dynamic main keyword of the post): example.com/blog/cosplay/hakurei-reimu-cosplay-from-touhou-by-kishigami-hana-755/ The website is a bit more than a half year old and receives around 650k page views a month, mainly from search traffic. Of course everything would be redirected with 301 redirects. Do you think it is worth changing to a new URL structure, or will it harm the ranking in the long run?

    Read the article

  • mod_rewrite for clean URL doesn't work

    - by deathlock
    Basically what I want to do is to convert this: http://localhost/jariungu/user_caleg.php?idCaleg2014=3 into this: http://localhost/jariungu/caleg/3 I have managed to make /jariungu/caleg/3 to direct to the original URL (as in, if I open that URL, it directs me to the appropriate page). The problem is, once opened, the URL returns to the original, ugly one in the address bar. This is what I tried. Could someone provide a help? <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteBase /jariungu/ RewriteRule ^caleg\/([0-9]+)\/([a-zA-Z]+\s*[0-9]*)/?$ caleg.php?idCaleg2014=$1&namaCaleg=$2 [NC,L] RewriteRule ^caleg\/([0-9]+)/?$ caleg.php?idCaleg2014=$1 [NC,L] </IfModule>

    Read the article

  • Considerations for changing URL path

    - by Mandar
    I am having an e-commerce site and current URL structure is like this: www.example.com/category1 [Category landing page] www.example.com/category1/sub-category [sub-category listing page] www.example.com/category1/sub-category/product-name [Product Details page] I am finding it difficult to identify from the URLs whether the URL is category landing page or a listing page or a product details page (primarily in Google Analytics). To solve this problem, I am thinking of adding qualifiers in the URL as follows: www.example.com/category1/cat-land [Category landing page] www.example.com/category1/sub-category/cat-list [sub-category listing page] www.example.com/category1/sub-category/product-name/prod-details [Product Details page] Original URLs would be redirected to new URLs using 301 permanent redirect. Would this have any negative effect on existing SEO and Google ranking?

    Read the article

  • Load nsimage from url but only some url's work

    - by happyCoding25
    I have some code that loads an image file off the web and puts it in an image view. The problem is it works with everything but Google Charts. This is frustrating because I was relying on this to graph data for my app. Heres the url I need to load: Click to see my test chart. Im not sure why NSImage seems to refuse to load this when it works with everything elese. If you know why or have a work-around any help is appreciated. Heres some sample code I found that I'm using to load the images: NSURL *imageURL = [NSURL URLWithString:@"http://chart.apis.google.com/chart?cht=p3&chs=700x400&chd=t:20,20,20,20,20&chl=A|B|C|D|E&chco=66FF33,3333CC"]; NSLog(@"url"); NSData *imageData = [imageURL resourceDataUsingCache:NO]; NSLog(@"data"); NSImage *imageFromBundle = [[NSImage alloc] initWithData:imageData]; (Note: This code will load any image except a chart) Thanks

    Read the article

  • Regex: absolute url to relative url (C#)

    - by splatto
    I need a regex to run against strings like the one below that will convert absolute paths to relative paths under certain conditions. <p>This website is <strong>really great</strong> and people love it <img alt="" src="http://localhost:1379/Content/js/fckeditor/editor/images/smiley/msn/teeth_smile.gif" /></p> Rules: - If the url contains "/Content/" I would like to get the relative path - If the url does not contain "/Content/", it is an external file, and the absolute path should remain Regex unfortunatley is not my forte, and this is too advanced for me at this point. If anyone can offer some tips I'd appreciate it. Thanks in advance.

    Read the article

  • Generating a canonical path

    - by Joel
    Does any one know of any Java libraries I could use to generate canonical paths (basically remove back-references). I need something that will do the following: Raw Path - Canonical Path /../foo/ -> /foo /foo/ -> /foo /../../../ -> / /./foo/./ -> /foo //foo//bar -> /foo/bar //foo/../bar -> /bar etc... At the moment I lazily rely on using: new File("/", path).getCanonicalPath(); But this resolves the path against the actual file system, and is synchronised. java.lang.Thread.State: BLOCKED (on object monitor) at java.io.ExpiringCache.get(ExpiringCache.java:55) - waiting to lock <0x93a0d180> (a java.io.ExpiringCache) at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:137) at java.io.File.getCanonicalPath(File.java:559) The paths that I am canonicalising do not exist on my file system, so just the logic of the method will do me fine, thus not requiring any synchronisation. I'm hoping for a well tested library rather than having to write my own.

    Read the article

  • dns hosting - url forwarding - hiding forwarded url?

    - by jeremycollins
    I have free dns hosting with the domain registrar and I'd like the dns hosted domain www.example.com to display contents of www.myotherlongdomain.com. I only have 301/302/iframe forwarding options, however I want to mask the redirected (longdomain) url. If I use frames, users can view the source and see the (longdomain) url the contents are coming from. How can I hide it so it always displays www.example.com? There is no cloaking/masking option with the registrar. Thanks.

    Read the article

  • Shopping Cart URL Structure

    - by Drew
    In regards to URL structure when it comes to guests and authenticated users, am I able to track traffic associated with both paths, but at the same time track total conversions going through the shopping cart? I have set up the following URL structure: Authenticated users follow this path: /cart /checkout /checkout-confirmation-ty Guests go like such: /cart /checkout-guest /checkout-confirmation-guest-ty can I track the authenticated and guest users separately? is this possible with Google Analytics?

    Read the article

  • What does it take to successfully run a URL shortener service [on hold]

    - by MxyL
    What are the costs (technology wise) for running a URL shortener service such as bit.ly or anonym.to? For example, if I decided to use an inexpensive shared hosting with "unlimited" bandwidth, would that be feasible? Or would I need a dedicated hosting? I found this question: I want to run a URL shortener for my own usage, what do I need to do?, which makes it easy to set it up, but I'm not too clear what kind of things I need to consider.

    Read the article

  • Do extra words in url affect SEO?

    - by smp7d
    Often for technical reasons we end up with some extra words in a url that we would not want to optimize for as they would have no bearing on the content. Examples would be: sportssite.com/content/sports-article movieportal.com/node/movie-review electronicsforum.com/blog/top-10-cameras webmasters.stackexchange.com/questions/34046/do-extra-words-in-url-affect-seo Do these have any affect on ranking in any of the major search engines? Would it behoove us to strip the extra words?

    Read the article

  • Uniform url in different device

    - by yanglifu90
    I noticed almost all of StackExchange's sites uses the same url in mobile browser, I think this is cool because when I share something on my phone, people viewing the link would not see a mobile webpage on their desktop. What is this specification called by W3C? How do I find other websites that use this technology. I noticed that ArsTechnica and the Telegraph used the same url with their desktop version.

    Read the article

  • bitly php url wont work???

    - by mathiregister
    Hi guys, <?php include('bitly.php'); $bitly = new bitly('myusername', 'myapikey'); print $bitly->shorten('http://www.google.com'); ?> WORKING!!! $currenturl = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; include('bitly.php'); $bitly = new bitly('myusername', 'myapikey'); print $bitly->shorten($currenturl); WORKING!!! include('bitly.php'); $currenturl = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; $url = "somehashtag" $shareurl = $currenturl . '#' . $url; $bitly = new bitly('myusername', 'myapikey'); print $bitly->shorten($shareurl); NOT WORKING!!! Any idea why? If i print out the $shareurl i can see that it's a completely normal url that i could paste onto the normal bit.ly website. I don't get it! Any ideas? Would be great if you could help me!

    Read the article

  • .htaccess url rewriting problem

    - by letsworktogether
    I'm kind of stuck at this part and was hoping that I'd get some assistance. I'm building a highscores page in PHP, that's going great, it works. however, I dislike the idea of "index.php?skill=name" and therefore wanted a bit of SEO in this. I have successfully replaced the url with a more friendly version: "highscores/skill/name" And this is where the problem starts, I have added pagination to the highscores and the page is read from the HTTP_GET page variable ($_GET['page']). I dislike the idea of "highscores/skill/name&page=2" and was hoping if you guys could assist me to make the url like the following: Page 1, so accessing the file without declaring the page number: DOMAIN.TLD/highscores/skill/name Page 1 so now the page variable is needed:DOMAIN.TLD/highscores/skill/name/2 As you can tell the "2" will define page 2 and load the correct data for page 2. However, I'm having much trouble in my .htaccess file to configure it this way. RewriteRule ^highscores\/skill\/(.*?)(\/(.*?)*)$ highscores/skills.php?skill=$1&page=$2 [L] # Skills page That is my latest attempt in order to get it to work, unfortunately it does not work, it makes the page look horrible (CSS doesn't work) and it doesn't go to the page specified on the URL. I hope you understand my issue, thank you!

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >