url

SEO and Duplicate URLS

I'm updating a website's menu system and adding SEO urls. I'll have two URLs pointing to a similar resource for a while but only one of them will be rendered on the menu. Should I leave the old URLs or delete them? If I leave them then google results wont link to 404 pages but they may be considered as spam. Should I redirect them perh...

Django: How to redirect to an external URL?

[Django 1.0.2] I have a view set up like this: (r'^redirect/(?P<object_id>\d+)/(?P<url>.*)/$', 'django.views.generic.simple.redirect_to', {'content_type': SiteType}, 'clickout'), When I get the following URL, two different things happen on local development server and on remote mod_wsgi server: # GET "/redirect/2/http://www....

URL-encoded slash in URL

My Map is: routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with params new { controller = "Home", action = "Index", id = "" } // Param defaults ); If I use the URL http://localhost:5000/Home/About/100%2f200 there is no matching...

Language neutral entry pages

My old web site has an index.html page … nothing strange! Everything is fine. The new web site has an english and a french version, so the new index is index.php?lang=eng…. That makes sense. I don’t like to make a front page that will say “english” or “french”. But that’s not good for ranking or seo. So the question is: How do I manag...

How can I programmatically obtain an image's REAL URL/Path?

To clarify the title question, I have code such as: <img src='gallery/main.php?g2_view=core.DownloadItem&g2_itemId=8161&g2_serialNumber=2&g2_GALLERYSID=5b24df90ee45f0e01795a3c01a1d634b'> with the file actually residing in the file system under my webroot. Is there any way in PHP to retrieve the images real path being served such as: ...

How to redirect www to non-www?

I am using URL re-writer module provided by http://urlrewriter.net/ site. Can anyone tell me how can I use there module to redirect www.example.com to example.com (301 redirect) Thanks ...

Generating Private, Unique, Secure URLs

I'd like to generate a secure one-click-access type of url similar to the examples below. I'll be using PHP but that is irrelevant as I'm just looking to understand the underlying concept. Some answers suggest using a GUID, but I don't think that will give me an absolutely unique, secure URL like below. # Google Calendar 3qq6jlu04ptl...

How to redirect a page url?

Hi, My problem is a little bit hard but simple. I have (or there is) a web page (http://sub.domain.com/page.php). An application graps data from this page. My aim is to change this page, not change it but let the system grap the data from c:\page.php. How to do the redirection? Thanks ...

How do I redirect from Apache to Tomcat?

I'm working on my first Java site. I'm running Apache Tomcat on port 8080, and Apache HTTPD on port 80. The current URL that I can access the site at is (for example) 123.4.5.6:8080. I want to remove the port number from the URL before I point the domain at the new IP. At the moment I am only using Apache for phpmyadmin, however I plan ...

Get file name from URL

In Java, given a java.net.URL or a String in the form of http://www.example.com/some/path/to/a/file.xml , what is the easiest way to get the file name, minus the extension? So, in this example, I'm looking for something that returns "file". I can think of several ways to do this, but I'm looking for something that's easy to read and sh...

replace urls

hi there, I have a huge txt file and Editpad Pro list of urls with images on the root folder. http://www.othersite.com/image01.jpg http://www.mysite.com/image01.jpg http://www.mysite.com/category/image01.jpg How can I change only that ones that has images on the root using regexp? http://www.othersite.com/image01.jpg http://www.NEW_...

Example.com alternative

Let's say you want to provide an example url in documentation somewhere. The correct thing to do is use example.com, since that is the defined location for such things and anything else you come up with is likely to be actually registered somewhere and serving up who knows what to your readers. My questions is, what do you do if you ne...

How do decode URL in Emacs Lisp?

I know there's got to be a built-in function to decode a URL-encoded string (query string) in Emacs Lisp, but for the life of me I can't find it today, either in my lisp/ folder or with google. Anybody remember what it's called? ...

What's the best way to secure a query string with Java?

When a user signs up in our Struts application, we want to send them an email that includes a link to a different page. The link needs to include a unique identifier in its query string so the destination page can identify the user and react accordingly. To improve the security of this system, I'd like to first encrypt the query string ...

Read URL to string Java with cookies

Hi, I need to read from an URL to String, and this is not a problem, but some sites demand for cookies to be enabled to provide content. So I need a way to get a content even if the cookies need to be accepted? Cheers ...

Can someone give me a Regular Expression to identify an encoded URL?

Hello, I am currently looking to detect whether an URL is encoded or not. Here are some specific examples: http://www.linxology.com/browse.php?u=Oi8vZXNwbnN0YXIuY29tL21lZGlhLXBsYXllci8%3D&amp;b=13 http://www.linxology.com/browse.php?u=Oi8vZXNwbnN0YXIuY29tL290aGVyX2ZpbGVzL2VzcG5zdGFyL25hdl9iZy1vZmYucG5n&amp;b=13 Can you please give me...

Are there any safe assumptions to make about the availability of a URL?

I am trying to determine if there is a way to check the availability of a potentially large list of urls (> 1000000) without having to send a GET request to every single one. Is it safe to assume that if http://www.example.com is inaccessible (as in unable to connect to server or the DNS request for the domain fails), or I get a 4XX or ...

Resource for Recognizing Framework/CMS From URL or Other Clues?

Hello, I'm curious to know which web framework or content management system a website is using based upon clues from the URL, headers, content. Does anyone know of a resource on the web that would provide this? For example: .html -> maybe a flat-file .php -> something built using PHP, perhaps. .jsp -> something using Java Server Pag...

url shortening service

I want to write a url shorten service. I trying to think of scenarios that would be dangerous. one I thought of was if a submitted url is from my own website, it would create an inifinite redirection loop. can you guys think of any other situations? (security holes, bugs...) ...

What does the url in XML file mean

I find this URL (or a similar one) always on HTML files, XML, XSD... Like "http://www.w3.org/2001/XMLSchema" or "http://www.w3.org/2001/XMLSchema-instance" I always wonder what those URLs means. Even offline the XML or HTML document works without changes. What's the benefits on links to those URLs?? Thanks ...