url

PHP get url out of a string and some more...

Hello, I have a string like this The theme song of whatever - http://www.anydomain.com/pop_new.php?sid=10623&aid=1581&rand=0.6808111508818073 #string And now, I need to do the following thing. Get the url from above string http://www.anydomain.com/pop_new.php?sid=10623&aid=1581&rand=0.6808111508818073 Replace the url ...

python code to retrieve url from mozilla

hi expert, is it any possibilities to retrieve currently open url in Mozilla firefox using python ...

Django: How to write the reverse function for the following

The urlconf and view is as follows: url(r'^register/$', register, { 'backend': 'registration.backends.default.DefaultBackend' }, name='registration_register'), def register(request, backend, success_url=None, form_class=None, ...

Routing & URL generation issue with optional parameters

Hi all, I've a small issue with URL generation & routing under ASP.NET MVC 2. My route has optional parameters and the URL is correctly generated if the parameters are specified. Thus: routes.MapRoute("Blog", "Articles/{tag}/{page}", new { controller = "Blog", action = "Index" }); with: <%: Html.ActionLink(item.Tag, "Index", "Blog"...

IIS cannot serve pages ending with .config

This is obviously a security issue and probably do not want to change this, but it would be nice to handle the error. Any ideas? I see that stackoverflow is not immune: http://stackoverflow.com/questions/tagged/web.config They seem to have changed the tag to web-config to fix the problem but you still get a very nasty error message wh...

URLs with query stripped of ampersands appearing in error logs

I've noticed a curious phenomena popping up in my error logs recently. If, as the result of processing a form, I redirect my users to the URL http://www.example.com/index.php?foo=bar&amp;bar=baz, I will see the following two URLs in my log http://www.example.com/index.php?foo=barbar=baz http://www.example.com/index.php?foo=bar&amp;bar=...

PHP Summarize any URL

Hey guys, How can I, in PHP, get a summary of any URL? By summary, I mean something similar to the URL descriptions in Google web search results. Is this possible? Is there already some kind of tool I can plug in to so I don't have to generate my own summaries? I don't want to use metadata descriptions if possible. -Dylan ...

slashes in url variables

Hi there I have set up my coldfusion application to have dynamic urls on the page, such as www.musicExplained/index.cfm/artist/:VariableName However my variable names will sometimes contain slashes, such as www.musicExplained/index.cfm/artist/GZA/Genius This is causing a problem, because my application presumes that the slash in t...

Extract URLs from text using Ruby while handling matched parens

URI.extract claims to do this, but it doesn't handle matched parens: >> URI.extract("text here (http://foo.example.org/bla) and here") => ["http://foo.example.org/bla)"] What's the best way to extract URLs from text without breaking parenthesized URLs (which users like to use)? ...

Codeigniter's URL Rewriting Problem

I’ve using the following htaccess script so that i can hide index.php from the uri. RewriteEngine on RewriteCond $1 !^(index\.php|resources|assets|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] But i’ve facing a major problem :( I’ve a directory named asset...

Perfect Hash Function for URLs

Does anyone know of a perfect hashing function for URLs with 64-bit integers that would perform well for most URLs? ...

Getting text after URL in asp.net / URL Rewriting (sort of!)

My app is a very simple "one page" type app- It has Default.aspx I'm basically trying to get, for example: www.myappurl.com/this is my text I want to get hold of "this is my text" from the above example. This will be displayed on the page (for now) I didn't really want to have to use any complext url rewriting things for this... (My h...

Clean URLs for images

I'm unable to get a working .htaccess that should accept clean URLs to load images. I mean, for example, if a user type this: http://mysite.com/image/example It works perfectly, as my PHP process and parse it. However, if the user type: .../image/example.jpg It doesn't work. I mean, if a user writes that, I want to load the module wi...

How can I match on, but exclude a regex pattern?

I have this URL: http://example.com/createSend/step4_1.aspx?cID=876XYZ964D293CF&amp;snap=true&amp;jlkj=kjhkjh&amp; And this regex pattern: cID=[^&]* Which produces this result: cID=87B6XYZ964D293CF How do I REMOVE the "cID="? Thanks ...

Changing IIS URL Rewrite config location

Hi When used at site level, the IIS7 URL Rewrite 2 module saves its configuration in the web.config file of that site. I'm using Sitecore CMS, and best practice is to store any web.config customisations in a separate config file for ease of upgrading, staging/production setups etc. Is there any way to specify a different config file fo...

NGINX rewrite for static dir

I'm trying to translate: mydomain.com/98387634/image/file.png to: mydomain.com/image/file.png Can anyone tell me what's wrong with my rewrite? rewrite ^~/static/(.*)/(.*)$ ~/static/$2 last; location ^~/static { expires max; root /var/www; } ...

Hide URL of PHP page

I want to hide the URL of my PHP page; that is, I don't want to write /register.php directly in the href tag, I want to write /register/ and have it open the register.php page directly. I want to do that for all the webpages. ...

What's the shebang (#!) in Facebook and new Twitter URLs for?

EDIT [10/15]: added an example from the new Twitter too to make this question easier to search for. I've just noticed that the long, convoluted Facebook URLs that we're used to now look like this: http://www.facebook.com/example.profile#!/pages/Another-Page/123456789012345 As far as I can recall, earlier this year it was just a normal...

Something wrong with redirects on my Joomla 1.5.18 site

My Joomla 1.5.18 site, I enabled login, when I click login the page I get sent to is NOT styled with CSS. If I login it redirects to the home page and it is not styled anymore either. It looks like it is recursively appending stuff to the URL incorrectly. http://www.myjoomlasite.org/index.php/index.php/login if I click on home page or...

Why do I get HTTP Code 414 on one network but not another?

I have an otherwise working iPhone program. A recent change means that it generates some very long URLs (over 4000 characters sometimes) which I know isn't a great idea and I know how to fix -- that's not what I'm asking here. The curious thing is that when I make the connection using a 3G network (Vodafone UK) I get this HTTP "414 Requ...