Forum Moderators: coopster

Message Too Old, No Replies

resolving .htaccess

how to unveil hidden php

         

macdar

5:03 am on Jan 27, 2005 (gmt 0)

10+ Year Member



Hi,
I was wondering if it is possible to "resolve" .htaccess file - I mean say that I have a website written in php but it looks like static one. But if someone take a thorough look at my links, there can be seen that's in php in fact. I've got links like this: foo2-s.html, foot3-s.html etc..Is there a way to find out that this is foo.php?id=1, id=2...? Is it possible to get those php links?

thanks.

WhosAWhata

6:13 am on Jan 27, 2005 (gmt 0)

10+ Year Member



as long as you have a proper .htaccess file that doesn't tell the server to send the browser a redirected header and you never put the php links themselves in the document, you should be safe

mincklerstraat

9:55 am on Jan 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're asking if you can know what the 'original' php links are in a script you didn't write that's using mod_rewrite, you *might* be able to find out fairly easily what the links are if the script is using a 'buffer hack' - this means it outputs its content, with the 'original' php links to a buffer, and not directly to the browser, and then goes through a final step of converting all internal links it finds to the static-like links.

If your script does ob_start() or ob_start('something') pretty close to the beginning, there's a good chance it's using a buffer hack.

You'll want to locate a part of the script where the buffer conents are fetched, and then replaced. If your script begins with ob_start(), you'll be looking for 'ob_get_contents()' - if the script begins with ob_start('something'), you'll be looking for a function definition of 'something' :
function something($somevar){
codelines;
etc;
}

The second part (and often the first part as well) is often found in the script's 'style', 'theme', or 'template'.

If you can remove these (if you remove the ob_start and set error reporting to E_ALL, error messages might help you find the second part), then you can see what the 'original' links are.