I’m confused by this statement.
Do you mean you want it to behave like you wrote mypage.com/clothes/dresses.php ? cause your version, clothes.php is a directory name. PHP pages dont have subpages.
You can write a rule to do this, but it will prevent you from visiting actual directories’ default pages.
Let’s say I have a page called clothes.php. If I send a request to mypage.com/clothes.php/dresses, then there is no problem … [‘path_info’] will store “/dresses”.
But if I send to “mypage.com/clothes (without .php) / dresses” it doesn’t work … So I added a rewrite rule so I could write “clothes” without “php” (which worked), but not if I extended with dresses (e.g. clothes / dresses) …
It’s okay if I change something and it prevents apache from listing the file system, the above is more important in this case
Then what you’ve done is not send a request to clothes.php.
As John’s link points out, there are ways of doing this, though i must say I don’t like the idea of it for just moving mypage.com/clothes.php?dresses to mypage.com/clothes/dresses, but to each their own.
You could write a rule for it, but you’d have to either be very specific, or very careful.
So, lets tick off a few boxes so that those that actually know how to write the rewrite rules you need can give you want you want;
Is this the only page and sub category you want this to apply to?
Does this apply to all pages on your domain?
Does this mean you won’t have any subdirectories on your domain?