I have the following real URL structure
/folder/folder2/file1.php
/folder/folder3/file2.php
where file1
and file2
could be any PHP file.
I also have
/folder/folder2/folder4/file1.php
/folder/folder3/folder4/file2.php
What I want to is change the URLs so they contain an ID like this:
/folder/12345/folder2/file1.php
What I am trying to do, is create a mod_rewrite rule that gets the ID and runs whatever the URL would be without the ID part
so
/folder/12345/folder2/file1.php
would run
/folder/folder2/file1.php?id=12345
What would the mod_rewrite rule look like to do this?
Also, what happens when I am submitting forms either as POST or GET? Can the mod rewrite work with either the post or the get?