url

Generate Sitemap from URLs in Database

Problem Statement: URLs are stored in a database, example: home/page1 gallery/image1 info/IT/contact home/page2 home/page3 gallery/image2 info/IT/map and so on. I would like to arrange the above urls into a tree fashion as shown below (each item will be a url link). The final output would be a simple HTML List (plus any sub list(s))...

Google Appengine URL security

Is it possible to ensure that GET/POST requests to a particular url of my Appengine app, AJAX or not, can only be made from within the app and not from outside (ie) all requests from other domains have to be rejected. Possible? ...

Test if webpage is responding via php

I'm trying to build a basic "status" page using php that will tell my users if various services (webpages we use) are at least serving up pages (which isn't 100% guarantee of working but its pretty good indicator) what i would like to do is something like www.domainname.com/mediawiki/index.php and make sure that returns the page or not...

Apply a class depending on current URL | Jquery

I have a main navigation but I need to apply the class of 'current' to the <li> if it matches the URL I have specified it should. This is what I have: $(function() { var url = location.pathname; if(url.indexOf('girls')) { $("li#nav-01").addClass('current'); } if(url.indexOf('boys')) { $("li#nav-02").addClass('current...

GWT, AppEngine and pretty url (human url)

Can anybody show a working example of how to get pretty urls on a GWT project over AppEngine. I know that you will suggest to look at UrlRewriteFilter. I have been burning it for 3 days and get no succedd. Please, could help? ...

PHP Regular Expression Text URL to HTML Link

I'm working on a project where I need to replace text urls anywhere from domain.com to www.domain.com to http(s)://www.domain.com and e-mail addresses to the proper html <a> tag. I was using a great solution in the past, but it used the now depreciated eregi_replace function. On top of that, the regular expression used for such function ...

is this url unvalid and not good practice?

i have a url in this format: http://www.example.com/manchester united note the space between manchester and united, is this bad practice, or is it perfectly fine, i just wanted to before i proceed, thanks ...

How do I pass a variable into a URL in a Perl script?

How do I pass a variable into a URL in a Perl script? I am trying to pass the variables in an array to url. For some reason it is not working. I am not sure what I am doing wrong. The code roughly looks like this: @coins = qw(Quarter Dime Nickel); foreach (@coins) { my $req = HTTP::Request->new(POST =>'https://url/$coins.com'); } ...

URL routing in mvc

Hi, I have this url working in my code: http://localhost:12345/home/index/&lt;parameter1&gt;/&lt;parameter2&gt;/&lt;parameter3&gt;/&lt;parameter4&gt; I want to change my url to NOT to include the home/index (<controller>/<action>). My current Global.asax entry is like: routes.MapRoute( "Default", // Route name "{controller}/{...

Parsing a list into a url string

I have a list of tags that I would like to add to a url string, separated by commas ('%2C'). How can I do this ? I was trying : >>> tags_list ['tag1', ' tag2'] >>> parse_string = "http://www.google.pl/search?q=%s&amp;restofurl" % (lambda x: "%s," %x for x in tags_list) but received a generator : >>> parse_string 'http://&lt;generator...

Generating link preview and detect video/image using a URL!

I am getting the HTML content of the page using the URL. once i got the HTML i m striping all the images using Xpath. I m stuck at how to fetch the video content. If i try checking for embed code ,it gives me all the adds inside the page. Please suggest me a workaround. Thanks in advance. ...

SEO benefits of URL as: www.example.com/category/subcategory/

Our SEO advisors are claiming that having our URLs in the form: www.example.com/category/subcategory/ leads to better ranking in the search engines, etc., but I'm not sure if that's true/valid. Do others use this practice in their own websites? The simpler alternative for us would be to do something like: www.example.com/showcat.p...

Import location in wsit-client.xml to file in another jar, using an URL string to locate a file on the classpath

Normally the wsit-client.xml has import statements like this: <import location="foo.xml" namespace="http://foo.org/" /> I've found that their can be online one wsit-client.xml on the classpath/META-INF, but can I refer to an xml who's located into another jar in that wsit-client.xml? Something like : <import location="classPathResour...

Using Python to download a document that's not explicitly referenced in a URL

I wrote a web crawler in Python 2.6 using the Bing API that searches for certain documents and then downloads them for classification later. I've been using string methods and urllib.urlretrieve() to download results whose URL ends in .pdf, .ps etc., but I run into trouble when the document is 'hidden' behind a URL like: http://www.oecd...

Mod rewrite user URL

Hi I'm lost here. I'm using this script to give users the opportunity to enter their username lijke this:domain/username <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ userpage.php?user=$1 [NC,L] </IfModule> Th...

How can I return or load a specific date?

Is there a way to return or load the calendar by an get URL. Something like calendar.php?gotoDate=2010-10-21 ? Many Thanks! Edits go here (not in answers or comments): Oops! I'm sorry: http://arshaw.com/fullcalendar/ ...

Could you share a link to an URL parsing implementation?

...

jQuery - Launch URL In Same Window, Then Refresh

I'm using jQuery-UI's accordion plugin with hash tag navigation, but I'm running into a problem. Each page of my site has an accordion widget on it. The URLs in the second level of my main navigation menu are supposed to open the correct panel of the accordion using the accompanying hash tag, and they are written like so: <li class="lvl...

htaccess 301 redirect certain URL pattern

Hi I'd like to redirect: http://site.com/FOO/BAR/BAZ to http://site.com/FOO/NEW/BAZ so, subsitute the second segment in my URL with a new one. ideally I'd like to use HTACCESS and a 301 as these pages have permanently moved. The URL structure will not change. Ideally there won't be a query string, but doesn't matter too much is ther...

How can I use Javascript to get a list of all picture URLs available on a site?

I'm curious as to how DownThemAll does this. Do they use Javascript? How can I get a list of all of the urls in a website using Javascript? ...