From: Matthew M. <ma...@tu...> - 2005-09-21 12:42:28
|
> Kenneth's idea of "shortcuts" is a > good one, but I would rather see short URL's than another core module > and another layer of admin. I would like to see phpWebsite be KISS > friendly (Keep It Simple Stupid). I think that having site.com/picnic would be much simpler than site.com/article1_3.html Shortcuts would allow people to actually tell people about a web address. After reading your suggestions, howver, I am thinking that the shortcut should have the .html on the end. The downside to the shortcut is that the url in the address bar can't remain the same because a header location command would control the redirection. > RewriteRule ^page([1-9][0-9]*)-([1-9][0-9]*).html$ ... In the example above, the link specifically is engineered to work with pagemaster. The action is view, the first number is the id, etc. There is nothing wrong with a specific module coming up with their own set of rules. If this is the case, the developer can tell the site admin to copy the line into the .htaccess file. What is needed however is a _generic_ mod_rewrite scheme that developers can use out of the box. The first version of .htaccess has default values. I just ran into problems when I had to add page to the mix. So I had to develop something that would accommodate any type of link you could throw at it. Getting too specific with variables will close off link options. There is another possibility I just thought of. The shortcut module could write to the .htaccess file itself. After registering the key word to a page, article, whatever, you could just push a button and shortcut would write the file. Also when a module is installed for the first time, you could register your specific mod_rewrite line and it would get added. What do you think of that? Matt -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |