My .htaccess rewrites to remove index.php and a few other things is probably not the most elegant solution in the world, so I wouldn’t mind improving it if possible. But, as I had help putting it together, I don’t know enough to go over it myself.
There are some quirks to the setup of my site that may preclude any improvements, but I figured I should ask. I am still on 1.x, btw.
These are some examples of what I am doing:
RewriteRule ^/?((403|404|About|Chat|Contact|Copyright|Search)(/.*)?)$ /Westeros/$1 [L]The above templates are held in a template group called “Westeros”, so I strip that out to allow access to them via just http://www.westeros.org/403/
RewriteRule ^/?((Index|Digest|Updates|Westeros|ASoIaF|Shared|Store)(/.*)?)$ /index.php/$1 [L]The path to the above template groups is rewritten to add in index.php.
RewriteRule ^/?Citadel/((Chapters)(/.*)?)$ /Citadel/Citadel/$1 [L]This is where it gets a little convoluted since westeros.org consists of a few distinct subsites, each housed in a subfolder. I am not using the multi site manager to manage these but rather the old method of the path.php file and a global “site” variable for each subfolder.
In this case, there’s a “Citadel” template group which I strip out so that the url to templates within it is http://www.westeros.org/Citadel/Chapters and not http://www.westeros.org/Citadel/Citadel/Chapters
RewriteRule ^/?Citadel/((Index|Articles|Books|Characters|Concordance|Encyclopaedia|FAQ|Gallery|Heraldry|Prophecies|SSM|Westeros|Citadel|Shared)(/.*)?)$ /Citadel/index.php/$1 [L]These are all template groups for sections that display within the Citadel subsite, so they are rewritten to add in the index.php at the right location.
Any obvious issues with this approach? Adding what to rewrite for explicitly works well for me, so I don’t mind that part, but perhaps I am overlooking some potential issues. I am also wondering if there are any changes in EE 2.x that may have problems with this setup for when I do upgrade?