Is it possible to set a wildcard * in a path pattern?
address=.example.com/foo/*/bar does not seem to work.
address=.example.com/foo/xxx/bar works but I have random characters I need to match for and I don't know what they are ahead of time.
Not possible.
dnsmask is about the resolution of the host name only.
Everything after the slash is between the web browser (or client) and the web server, the name servers don't ever get to see this part.
It can get confusing, because dnsmasq uses '/' as its separator character in a lot of its settings, but this is nothing to do with the path part of a url, simply a chose of config file delimiter.
To achieve some fine grained manipulation of what parts of a web server you want your users to see, you should be googling "http proxies" or possibly "transparent http proxies" and this should get you started. These provide an intermediate server that does get to see the "path" part of the URL, and con do this level of filtering.
Related
I am getting the path /#! requested regularly on my blog and i was wondering why this was (as it doesn't match to any URL/resource on my blog). The user agent says its always IE7 browsers which request this but from multiple different IP Addresses. I'm trying to work out if I can ignore this or if I need to do something about it.
I specifically want to know the following:
Is it some kind of special URL for certain web browsers/web servers?
Is it connected to a specific exploit?
Can I just ignore it?
If its relevant the site is hosted in windows azure and running on MVC4.
It's a hash-bang URL. They're used by some AJAX web applications, like Facebook and Twitter. Google has some special treatment for them, to make normally uncrawlable AJAX sites crawlable.
However, if your site is not running an app that uses them, you shouldn't be seeing them. And you definitely shouldn't be seeing them on the server side, since the whole point is that everything following a # in a URL is a fragment identifier, and should be stripped off by the user agent before requesting the URL from the server.
Edit: If I had to guess what's requesting such URLs, I'd say it might be some buggy bot. The fact that it's apparently pretending to be IE suggests that it might not be up to anything good; maybe it's a spambot of some sort. Anyway, the requests as such are most likely harmless, and you can ignore them. If it makes you feel better, you could always set up a rewrite rule to explicitly reject them, something like:
RewriteRule \x23 - [F]
This should reject any requests for URLs containing the # character with a 403 Forbidden error.
Well, # is a valid anchor that just means "the page". You can also make a '!' anchor, e.g.
<!-- some html here -->
Click me!
<!-- lots more html -->
<div id="!">
Wooaaaah!
</div>
So my guess is that you can safely ignore it... but that's just a guess ;)
I have a problem in my URL in my browser.
If I type http://int-test.company.com/test.png
It automatically became http://int-test.company.com.company.com/test.png
But if I type using the host ip (for example 10.218.132.18/test.png) it works fine.
Also it only happens on one particular host name.
Have I configured something unknowingly in the browser settings?
Any idea why?
I've tried it in all browsers (IE, Google Chrome and Firefox) and encountered the same problem.
Thank you
I would suspect it's problem of your web server configuration rather than the browser. It probably contains some check that's supposed to redirect you to the canonical address, but the check is incorrect and adds the domain to URL that already contains it.
To check, have a chat with the server by hand. It's pretty easy. Take netcat (usually called just nc) or telnet or putty, direct them to the HTTP server port (using command like telnet int-test.company.com 80 (putty is an exception -- it has configuration dialog)) and type in
GET /test.png HTTP/1.1
Host: int-test.company.com
and a blank line. If the answer starts with number begining with 3 (300 to 303) and contains line like
Location: http://int-test.company.com.company.com/test.png
than that's the problem. Get the server administrator to fix the configuration. Correct answer should begin with digit 2 and after few lines be followed by lot of garbage, which is what PNG file dumped to the console looks like.
I recently purchased the domain name simply.do. I want to use it as a URL shortening service, but I don't like have to do simply.do/something. Can I remove the slash or replace it with a difference symbol?
If this helps, I am using a server running Nginx and I will not switch to Apache.
Thanks!
I would also appreciate any feedback on the domain name. I was hoping to sell simply.do/insurance, simply.do/religion, etc. to various companies. Do you think there is a way I could sell these parts on an auction website? Thanks!
When you visit simply.do, that refers to simply.do/index.php (if you use php in background).
So, you can use it as query, for eg, simply.do?insurance will lead to some long url like ://a-long-domain-name/a-long-list-of-directories.
Use server script to get the value after ? mark so that if someone visite simply.do?insurance, it will be like simply.do/index.php?insurance. It works with all browsers.
You can obtain the value from the $_SERVER['REQUEST_URI'] OR $_GET[] array, check if the query string: 'insurance' is in your db or not. If yes, redirect the user to required site.
You need to know how the HTTP protocol works here, to better understand what you are doing. If you want to sell the URLs, you need a basic URI handler for /insurance, or /religion. You can also sell insurance.simply.do, If you want to, thru' DNSes and default VirtualHost handlers.
This answer is irrespective of the server used.
You cannot remove/replace the / right after simply.do since it delimits the host and the path in the URI.
Having a strange issue - we have a page that uses a query string to get some information, this query string happens to contain the word set. When this happens, the page returns a 406 error (Client browser does not accept the MIME type of the requested page.)
The URL looks like example.com/folder/file.asp?variable=sunset boulevard. If I change the space to %20 it still returns 406.
On my local machine running IIS 5.x this doesn't happen, on our test server running IIS 7.x this doesn't happen, only on our production server running IIS 7.x over SSL. Note however that a self signed certificate on my local machine over SSL still doesn't produce the error.
So my question is, what does the set keyword in the URL tell IIS to do and is there an easy way to avoid it happening? I would like to avoid changing the space to a different character if possible.
Does your server have additional filters installed? Smells like the work of an agressive filter designed to prevent certain types of attack.
It took me a while to learn that I have to put a dot after the "localhost" in the URL so that I can use fiddler with my development server.
Why do I need to put this dot here to make fiddler work for my local:
http://localhost.:1888/MyPage.aspx
What does it stand for?
thanks
It's not that you're making fiddler work, but you're making Internet Explorer work. Internet Explorer is written specifically to bypass the proxy server for "localhost" . By attaching a trailing dot, you're providing a valid DNS name that does not match the mechanism within IE that checks the domain (IE does a stricmp(userdata, "localhost") or equivalant).
localhost. just makes the hostname visible to Fiddler; otherwise, IE bypasses proxies.
You can also substitute "ipv4.fiddler" for "localhost" -- which can help prevent confusion, since the dot is easy to miss.