On using Asterix in URLs
Using an Asterix in your URL is probably not such a great idea, largely because:
- Neither UTF-8 or ASCII is currently able to denote an Asterix.
- He would be little more than a smudge in a standard browser address bar.
- I doubt he'd like it very much. And he has some quite large friends.
- It's just weird.
On using Asterisks in URLs
Using an asterisk (*) in a URL (and, yes, I know that's what you meant all along) is also not such a great idea. Because it's a reserved character, it's not used anywhere else; even though your URL scheme seems user-friendly to you, few will think to try it, and it's likely to give unpredictable results because the meaning of wildcards in URLs is hard to discern. (I couldn't tell what all of your examples meant until I read your descriptions.)
Not only that, but there might be some more semantic/meaningful ways to do what you describe. For example, you could append a query string and use a 'find' and 'where' variable to tell your method what to find where:
Find pages starting with 'search phrase' in /some/folder/:
example.com/some/folder/?find=search-phrase&where=start
Find pages with 'search phrase' anywhere:
example.com/some/?find=search-phrase&where=anywhere
To show all pages, I would use a separate method called 'all' instead of a query string or wildcard syntax:
example.com/some/folder/all
The query string syntax is far more common than asterisks -- look in your address bar next time you do a Google search, for example -- and it will likely be easier to code too.
Finally, if you don't like the look of query strings, you could prepend a method name called 'search' and then use the next two blocks as the 'find' and 'where' variables. e.g. Instead of:
example.com/some/folder/?find=search-phrase&where=start
You could have:
example.com/some/folder/search/search-phrase/start
Then, you just need to check for the 'search' keyword in your URL path, and trigger the your search method using the next two path segments as variables.
UPDATE: I found my first asterisk in a URL today. The new archive.org interface is using it exactly as you describe (as part of a search feature), in place of an 'all' keyword. e.g.:
http://wayback.archive.org/web/*/http://google.com
instead of
http://web.archive.org/web/20040214050058/http://www.google.com/
The first example returns archived listings from all dates for google.com, rather than just pages from a certain date (second example). Interestingly, I can't link to the live page here, because the Stack Exchange site encodes the * character as %2a when it appears in URLs, which results in a 404 from archive.org. (Perhaps another reason not to use asterisks in URLs.)
I still think it's not quite as clear as 'all', but, if you're looking for examples of other sites adopting asterisks in their URLs, that's the first one I've seen.