My question should be pretty easy for you guys-
Current htaccess Rewrites
- Code: Select all
1. RewriteRule ^ic/(.*) includes/css/$1 2.
RewriteRule ^ij/(.*) includes/javascript/$1 3.
RewriteRule ^ii/(.*) includes/images/$1 4.
RewriteRule ^is/(.*) includes/swf/$1 5.
RewriteRule ^po/i/(.*) products/individual/$1 6.
RewriteRule ^po/b/(.*) products/business/$1 7.
RewriteRule ^po/(.*) products/$1 8.
RewriteRule ^scripts/(.*)\.pl$ /cgi-bin/$1.php
Notice how #7 seems to be redundant or something? Shouldn't I be able to move #7 above 5 and 6 and shorten the code?
This enables me to have a verbose file structure so maintaining the site is easy and clear. But to make my XHTML cleaner and simpler and smaller (bytes) I reference files like so-
- Code: Select all
products/ po/
products/business/ po/b/
products/individual/ po/i/
includes/css/ ic/
includes/javascript/ ij/
includes/images/ ii/
includes/swf/ is/
Before I used poi/ and pob/ but I changed that to make my applications like breadcrumbs, php, etc work more logically.
This isn't a crucial thing that I need right now, I more want to learn and discuss the best-practices way of rewrites for this particular use. Please help me out! Peace out