url

adding on ?v=1 to urls

As seen in the code from http://html5boilerplate.com/ (ctrl+f "?v=1") What does ?v=1 do exactly? It's tacked on to the external css and js urls. ...

Apache rewrite rule which works with or without a trailing slash

I'm trying to redirect a series of static URLs, and I want it to work whether or not the trailing slash is present: /foo/bar ---> /tacos /foo/bar/ --> /tacos I've tried the following, and all sorts of variations, but I always get a match only with the trailing slash present: RewriteRule ^foo/bar?/$ http://url.com/tacos RewriteRul...

How can I set scheme to a URI object in Ruby

I'm trying to parse a URI from user input. I'm assuming some users won't put the scheme in their URI's and I wan't to default to "http" I wrote the following code which I thought should work. But it dosen't. require 'uri' uri_to_check = URI::parse("www.google.com") uri_to_check.scheme = "http" unless uri_to_check.scheme puts uri_t...

How would I redirect urls in this way?

So, this is a little bet more of a high level question. I'm not necessarilly looking for specifics, but more of the general tools and technologies I need to use. I'm really new to website hosting and development. I want to redirect a domain, say something.com to something.squarespace.com. How would I go about doing this so that the foll...

php getting substring from a string.

I have the next URL: http://domen.com/aaa/bbb/ccc. How can I get the string after http://domen.com/? Thanks a lot. ...

Codes in the FaceBook share URL's

What is the h=(some code) and/or ref=(some code) at the end of the url in the link of something shared on FaceBook? ie. If you click on an item that was shared by someone on their wall, the url it takes you to has this code at the end of it. What specifically is that identifying? ...

JavaScript put variably into url, then use it if reloaded

We're working on a music page to list albums, songs and add lyrics. We have a "View More" below each album, clicking that shows you the song list (using jquery, making a hidden div slide down). We'd like to add a variable to the URL if someone clicks it (or remove it if they "hide") the songs, so that it creates a permalink to that sec...

URL not showing the right address after using servlet request forwarding.

Hi guys, I am having a weird problem here, and I am really stuck, need to get this work badly. so i have a page say index.jsp with a link say "a href=servlet?action=viewMenu". when I click on this link it will go to doGet() on my servlet and here is the code in my servlet. protected void doGet(HttpServletRequest request, HttpServletR...

Is there a list of "potentially dangerous Request.Path" values?

I want to generate slugs for my pages. To that end, I want to remove all the "dangerous request paths". Is there a list anywhere, or is there a way to find out? Thanks in advance. ...

Open specific trail with a url scheme from NSDictionary.

Hi, I am using TouchJSON to retrieve the JSON response from http://enbr.co.cc/TrailsApp/shops.php. In my app I use this code to handle a url scheme. - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { if (!url) { return NO; } NSString *urlString = [url absoluteString]; NSString *urlStrin...

Ninject 2 with MVC 2 Case Sensitive Controller Names

I have a new MVC 2 project using ninject 2 for IOC. I have the following global.asax which sets up both NHibernate and Ninject. The code runs fine, ninject pulls out the controllers from the assembly (it does convert them to lowe case strings when it does this - inside the Ninject source). All my controller URL's are now case sensitive ...

how to make url slug like Quora does using yi framework ?

Using Quora has made me wonder how they do their slug like thes : quora.com/topics-slugs , quora.com/questions-slug or quora.com/usernames-slug. Actually i am developing an application with yii framework and i want to have a slugs like quora does? Thanks guys ...

A url resource that is a dot (%2E)

I have a resource that is a . This means my url looks like this: http://myapp/index/. And i need to add query parameters so that it looks like this: http://myapp/index/.?type=xml I use Freemarker for the presentation of my resources and made a percent-encoding hack for this case: <#if key?matches("\\.")> <li><a href="${contextPath}/inde...

URL Redirect with Python / Django / Mod-Rewrite

I am trying to setup a URL redirect for a Q&A site I am setting up for Boat Repairs. I want boatrepaired.com to go to www.boatrepaired.com. I am generally a php guy so I am a bit confused with python etc. used by OSQA. I added this to my apache conf file... <Directory /opt/OSQA/> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^...

stumbleupon badges and spanish characters

hey all, using the stumbleupon badge code for a url like http://www.test.com/¿cómo_se_dice with the following snippet <script src="http://www.stumbleupon.com/hostedbadge.php?s=2&amp;r=http://www.test.com/¿cómo_se_dice"&gt;&lt;/script&gt; it will recognize the url as http://www.test.com/cmo_se_dice and remove the spanish character...

django: dynamically populate nav elements

I am writing a blog application as a part of a larger website. I want to have a main (static) nav bar for the site navigation, but I want to have a sub nav that allows the user to filter the blog posts by other criteria when viewing the blog. Something like Latest | Popular | Category | Author | Date | Tag |-> News ...

three20 TTURLRequest resend

I have a REST service that uses an auth_token that expires every so often. when a request fails, I want to re-authenticate (which I'm able to do) and then resend the same exact TTURLRequest in the following generic way: - (void)request:(TTURLRequest*)request didFailLoadWithError: (NSError*)error { NSLog(@"error %@ %@ %@", [erro...

what is the problem with my http GET ??

in VBA i am creating a URL: URL = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=" & yahoo & "&street=" & street & "&city=" & city & "&state=" & state & "&zip=" & zip for example it sets itself to equal this: http://api.local.yahoo.com/MapsService/V1/geocode?appid=username123&amp;street=1893 n. clyde morris blvd &city=dayto...

Ok, I've got the bit.ly link, but now the asynchronicity of jQuery is getting in the way.

function dlLink(title, currentArray, currentIndex, currentOpts) { var img = new Image(); img.src = 'Gallery/Wallpapers/' + title; html = img.width + ' x ' + img.height + '<br />' + '<a class = "nav" href = "Gallery/Wallpapers/' + title + '" target = "_blank">Download</a><br />http://'; ...

Assigning permalinks to a page in PHP (Without using htaccess redirect)?

Hi, This is a noob question I belieive, in a content management system as well as several other types of sites that work on submissions, once you submit a URL in a URL shortening website for instance, how do you use PHP to redirect to the appropriate URL without a 404 or without using an htaccess. Based on what I've found in simple url...