EX. 1
domain.com/param1/param2/param3/etc.
SENDS THE SERVER TO:
domain.com/index.php/param1/param2/param3/etc.
AND EX. 2
domain.com/DIRNAME/param1/param2/param3/etc.
SENDS THE SERVER TO:
domain.com/DIRNAME/index.php/param1/param2/param3/etc.
I want to have both these rewrites in one .htaccess, at the root of the site. They need to be able to work for any domain and any dir name. I have a working solution for each scenario, but I can't get both to work together:
Solution For EX. 1:
- Code: Select all
RewriteRule ^(.*)$ index.php/$1 [L]
Solution For EX. 2:
- Code: Select all
RewriteRule ^([^/]+)/?([^/]+) $1/index.php/$2 [L]
My instinct is that I need to add some conditional processing... But I can't figure out how to do that (after 4 hours Googling) and I admit, I know nothing about mod_rewrite. There might be an easier way to accomplish this anyway - I'm hoping someone here can help... Thanks in advance!