I can't understand what's happend - please help

Hi every body

I am a PHP developer with 10years exp. in development.
when I open the url “http://localhost/index.php” the website appear without any problem…
but when I add “/” to the URL “http://localhost/index.php/” the website appear without image …

what is the problem ? and how can I solve it…

also
I am using iis with PHP
1- what is the setting to make iis top secure ?
2- what is the setting to make session & PHP secure ?

I will be very thanks for any help

Are you using url rewrites?

No …

Ok, it would make a bit more sense if you were but there are ways to wire things where this would still work.

In general, for securing PHP on IIS I would just use the web platform installer’s defaults is a great start and typically all one needs to do in most scenarios.

As for the url problem, the issue is that by adding the trailing slash you have now moved up a folder. So if your url links were relative they are off. If you load up a http debugger like the dev tools in firefox or in chrome that should illustrate it clearly.

Thanks for ur reply …

can you help me to write a rewrite to IIS to remove or ignor slashes from url (to solve this problem) ?

also my friend try check the website … he find
HTTP OPTIONS method is enabled on web server … how can I make it disable ?

ruba,

WHY would you add a slash to a valid URI? That tells the server that it should look for a directory, not a file. (IMHO, it’s a bad technique that some webmasters are trying without understanding the adverse consequences.)

DON’T add a trailing / unless you’re requesting a directory (in which case, servers will usually add the / for you). Remember, you’re affecting all the relative links, too, by changing the directory level like this.

Regards,

DK