var uri = new Uri(url);
var relurl = uri.Scheme + "://" + uri.Authority;
foreach (var v in uri.Segments.Take(uri.Segments.Count() - 1)) { relurl += v; }
module Rack
class Request
def subdomains
...
Ruby Personalized URL (Purl) Sub...
by grayfm,
January 11, 2010 22:25,
4 refactorings, tagged with url, rack, domain, sinatra, subdomain
So i need to define @purl_b...
<?php /* E.g: ...
PHP remove http from url string
by armano.myopenid.com,
November 11, 2008 04:09,
15 refactorings, tagged with url, short url, remove http
Ive made a function simply ...
function create_link($string) {
$input = media_title($string);
...
PHP Prepare links - friendly URLs
by Memf,
September 04, 2008 05:57,
2 refactorings, tagged with create link, links, memf, function, memforis, code, prepare, URLs, url, friendly urls, friendly, short, php
Please help shorten the cod...
# This method searches a source by the http, the www and the trailing / to a url
def self.find_by_url(url)
Source.find :first, :conditions => [ " url = ? OR url = ? OR url = ? OR url = ? ", url, url.gsub("http://", "http://www"), url + "/", url.gsub("http://", "http://www")+"/"]
...
Ruby Find a URL in a database
Hi!
I've a got a website A...
<? php
if $userinput = "http://www."
{
...
PHP Replace user input with link
by Mlopez,
January 02, 2008 01:39,
28 refactorings, tagged with http, parsing, phrasing, help, user, php, url, with, text, replace
im not quite sure where to ...
<script type="text/javascript">
window.onload = function() {
...
JavaScript Shorten links
is there a better, shorter,...
<script type="text/javascript"> var feature_stuff = new Array( '<li><a href="#">URL 1</a></li>', ...
JavaScript Random URL
Outputs one of the 5 urls r...
i want http://mysite.com/fo...
>