I am focusing on my first site which lives on the top of the PHP/Apache stack.

My website includes a logical menu structured such as this:

+AAA Entry
  -AAB Entry
    -AABA Subentry
    -AABB Subentry
  -AAC Entry
    -AACA Subentry
      -AACAA Subentry
      -AACAB Subentry
    -AACB Subentry
  -AAD Entry

+BBB Entry
  -BBC Entry
    -BBCA Subentry
+CCC Entry
+DDD Entry

Let me have valid Web addresses such as these:




I have find out about mod_rewrite's RewriteRule and RewriteCond but I am unsure regarding which approach to use when it comes to maintainability. Let's say I choose to add another level to AACAA, for instance? Will I must wreck havoc on mod_rewrite again and again again?

Could it be appropriate to redirect everything to index.php and parse REQUEST_URI by hand? How's this made by professionals?

It is simpler to forward all Web addresses for your controller script, and do your routing in PHP:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* my_script.php [L]

The directs all demands for files that do not exist through my_script.php. After that, you can even examine the request URI, explode it into segments delimited by forward slashes, and path to the right file.