If a site uses .htaccess file to rewrite the URL for e.g. better SEO. Is it possible to find out what is the "real" URL?
|
This is not possible unless you know the rewrite rule. In some cases direct access the "real" file is forbidden entirely. Other than that you could try using DirBuster with a custom directory list, such as a list created from the seo friendly urls. Being hackers we all know how to write code so this is pretty trivial. |
|||
|
|
|
I'm not sure what your question is. Let's say you have a simple rewrite rule like to redirect content from
Then a user's web browser sends a GET http request to
The web server catches this in the rewrite rules, and sends back a http response from the server like:
and then your browser fetches whatever content is at So what is your question? You presumably know (and can easily log) the web addresses your browser has been requesting before it has been rewritten. At the very least you can capture the GET requests by following the TCP stream with a tool like wireshark. You know where the redirect rule has ultimately sent you; e.g., the location is now displayed in your web browser. If you have access to the apache logs from the webserver side you'll see something like:
though you could easily just look in the apache configuration to find the actual rewrite rules. Note: none of this has anything to do with where the content is stored on the web server. There may be no directory called
which could be then run as |
|||||||
|
