url

same page, different urls. redirect?

Say that I have an article with multiple pages. Each page has a short title for in the URL (wordpress calls them post slugs). If this title is not given in the URL, the first page is shown, so example.com/myarticle is the same page as example.com/myarticle/firstpage. The question is: Should I redirect the former to the latter? And if so...

URL Verification in multi-tenant architecture

what would be the best way to verify URLs in a multi-tenant architecture web-app to make sure that a user from one org does not gets access to the another org's data simply by changing the query string parameters. I dont want to be doing a verification on each page load. the app is being built on ASP.net 3.5. ...

How can I add a custom url handler on Windows. Like iTunes itms://

I would like telnet://blah to open putty and not the native windows telnet client. I don't even know what this 'feature' is called under windows so I'm having no luck find any information about it. Thanks in advance, Jan ...

Remove WWW prefix from your website

How does Stack Overflow (and other web sites) remove the 'www' prefix when it's entered as part of a URL? Is it a redirect, a rewrite or something else entirely? Update: I'd specifically like to know in the context of IIS 6 ...

Can '//' effect the http request performance?

Suppose for any url if a '//' is added instead on '/' by accident in the request. Can this effect the http request performance? e.g. http://www.microsoft.com/downloads v/s http://www.microsoft.com//downloads This reason I am asking this is; in one of our application the dynamic urls were building wrong on production server for som...

Get source of some http url with javascript

Please, I have another simple question for experienced programmers. Is it possible to get source code of any webpage with javascript at client side? With AJAX maybe? But I need that the server I am downloading the url from does see the IP of the client.. with AJAX it will show my script server IP, right? Thank you in advance. ...

How to remove x and y on submit in HTML form with Image type button ??

I have created a form in my application as follows: <form action="/search/" method="get"> <input id="search-box" name="search" type="text" size=30 title="Search" value="" /> <input id="search-submit" type="image" alt="Search" src="/images/search-button.gif" /> </form> But when I am submitting my form then URL is created as belo...

Best way to convert a Unicode URL to ASCII (UTF-8 percent-escaped) in Python?

I'm wondering what's the best way -- or if there's a simple way with the standard library -- to convert a URL with Unicode chars in the domain name and path to the equivalent ASCII URL, encoded with domain as IDNA and the path %-encoded, as per RFC 3986. I get from the user a URL in UTF-8. So if they've typed in http://➡.ws/♥ I get 'htt...

Passing value through querstring without showing the destination page in the URL with ASP.NET web form

Hi, I have a small web app being written in ASP.NET, VB.NET , .NET 3.5 I pass a value from default.aspx to demo.aspx using query string. When Go button is clicked the URL will be like this : localhost/demo.aspx?id=4 But I want URL to be sth like this when Go button is clicked : localhost/?id=4 and the id value is passed to demo.aspx s...

how to avoid hard-coding urls in webapp templates

I'm developing software on google app engine. I'm using the webapp framework. is there any way to avoid hard-coding urls in the html templates? django provides a solution, but I couldn't find one for webapp. thanks in advance.. ...

How to count URL domains in MySQL?

I have a MySQL table with a column of well-formed URLs. I'd like to get a table of the unique domain names in the column, and the number of times each domain appears. Is there a MySQL query that can do this? I thought of doing something like... SELECT COUNT(*) FROM log GROUP BY url REGEXP "/* regexp here */" ...but this doesn't work ...

URL rewriting-page not found error

In order to convert my dynamic URL i.e www.3idiots.co.in/index.php to static url i.e www.3idiots.co.in/index.html, I edited my .htccess file and put the following code in it: RewriteEngine On RewriteRule ^index.php$ /index.html [R] when i uploaded this file in the root directory,and try to open the page, I got the error 404 page n...

Is file path a url?

I have a variable in code that can have file path or url as value. Examples: http://someDomain/someFile.dat file://c:\files\someFile.dat c:\files\someFile.dat So there are two ways to represent a file and I can't ignore any of them. What is the correct name for such a variable: path, url, location? I'm using a 3rd party api so I can'...

permanent alias url for small business website without having to change DNS

Question: Is there a service or a system methodology that would allow someone to setup a permanent base URL that could be used as a referrer to a business website regardless of where that website may be hosted at any given time? Example: suppose you have two websites that have identical content (they are just mirrored or synched copies)...

querystring using xslt

is it possible to access a query string using xslt? i have a url e.g www.example.com/page.aspx?k=aa&lang=en I want to do something like if lang = en <div>displaly stuff</div> else <div>display other stuff</div> can you show me how to do this using xslt? ...

HTTP 400 : detected invalid characters in the URL. IIS decoding URL too early? Whats going on here?

So i have this URL: http://test.com/afolder/who-else-wants-to-make-horror-movies%3f/ which is URL encoded version of : http://test.com/afolder/who-else-wants-to-make-horror-movies?/ But IIS7 throws a 400: HTTP Error 400.0 - Bad Request ASP.NET detected invalid characters in the URL. But why is it doing that if i have correct...

How to create friendly URL in php?

Hi, normally, the practice or very old way of displaying some profile page is like this: www.domain.com/profile.php?u=12345 where u=12345 is the user id. recent years, I found some website, their url very nice, its like: www.domain.com/profile/12345 How do I do this in php? Please teach me, thanks EDIT: Just a wild guess, is it some...

Are there any session security loopholes in my PHP script?

After I authenticate user login info, i create this session for them: $_SESSION['username']= $userName; Then, I redirect them like this: header('Location:www.domain.com/profile/' . $_SESSION['username']; I want my website to have a beauty URL, something like: www.domain.com/profile/userName Thus, in all my redirect links (HTML <a...

HTTP URL - allowed characters in parameter names

Is there any formal restriction as to which characters are allowed in URL parameter names? I've been reading RFC3986 ("Uniform Resource Identifier (URI): Generic Syntax") but came to no definitive conclusion. I know there are practical limitations, but would it actually be forbidden to do something like: param with\funny<chars>=some_v...

How to append variables to a url which already has variables?

Hi all, So, the situation I'm currently in is a wee bit complicated (for me that is), but I'm gonna give it a try. I would like to run to a snippet of HTML and extract all the links referring to my own domain. Next I want to append these URL's with a predefined string of GET vars. For example, I want to append '?var1=2&var2=4' to 'ht...