.htaccess is now a very common URL rewrite to make it SEO friendly and cover the database IDs.

What are the ways to explore php file on the server given to URL via .htaccess?

Example : The URL is www.domain.com/news/56.

I expect to find news.php?id=56 i.e. www.domain.com/news.php?id=56

1 Answer 1


No, there is no way for you to find this.

The reason for this is that rewrite rules are not visible to the client, as they are performed server-side. You further cannot be sure whether or not it is a simple rewrite, or if the whole HTTP request is handed over to a complex web application, which parses the route to determine which class and method sends the response.

  • 2
    Although most are asking for help with their ".htaccess problems" on SE, making their rewrite rules all publicly available. ;) Commented Apr 23, 2020 at 12:24
  • Precisely, Esa. I am aware that the .htaccess is performed at the server-side but I am here to explore options, not to read .htaccess clean but figure it out how to reach the PHP file. Maybe a script to check?
    – Jack
    Commented Apr 23, 2020 at 12:54
  • @EsaJokinen do .htaccess files still see widespread use? Commented Apr 23, 2020 at 13:01
  • @multithr3at3d: There are two possibilities: either they are still mainly used despite it's clearly not recommended by the .htaccess documentation itself... or anyone who has grown out of .htaccess won't keep asking any questions as they already know what they are doing. (Or, in worst case scenario, most of the administrators have no clue what they are doing.) Commented Apr 23, 2020 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .