2011-06-17, 00:50:20
RobA Wrote:I just noticed (realized) that child/parent relationships are not "enforced" when using pretty URLs.
...
Does anyone have any suggestion on how to enforce the URL structure and make only the first work?
-Rob A>
1. Change the RewriteRule in your .htaccess file to allow only one and two levels, something like:
Code:
RewriteRule ^([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/?$ index.php?id=$2&parent=$1 [QSA,L]
2. Write a plugin, which tests the parent parameter in the hook index-pretemplate and shows 404 Page not found, if it is incorrect.
3. Submit the plugin to Extend ;-)