I know many people had posted many threads on the subject already by now. But still, I couldn’t find a solution to override the topic. By now, I’m currently managing 3 Expression Engine powered sites, and would like to have the default index.php removed from them. I’ve checked with my hosting provider, they’re running the following technologies on their server
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.somedomain.com Port 80
and yes they also enabled mod_rewrite for clean permalink (no index.php). So after a few small research on the EE’s wiki, I stumbled upon this article. The include list, as far as I see it, is the most decent and reasonable method to tweak this situation. So here’s what I’ve got so far:
RewriteEngine on
RewriteCond $1 ^(weblog|member|search|Forum_Name|TemplateGroup_4_Name|TemplateGroup_5_Name|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
From the above code, I may conclude that all I have to do is simply putting my group’s name from my template management section. And that is exactly what I did. by going to Templates > Template Management, would reveal all my templates collections. So assuming I have the following template name :
- site* (Indicates master site default page)
- search
- embed (has many others embeddable variables)
- about
- products
- clients
- news
- downloads
- contact
- vacancies
would that imply I only need to tweak my .htacccess file as the following :
RewriteEngine on
RewriteCond $1 ^(site|search|embed|about|products|clients|news|downloads|contact|vacancies|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
After saving the .htaccess, and putting them back in the root folder my public_html, I realized it didn’t do anything. I even trying to type manually on the address bar as per the following :
-http://www.somesite.com/about as replacement for http://www.somesite.com/index.php/about
But it didn’t do anything, hopefully my post won’t get confusing. So anyone with a successful stories in removing the index.php may help me out to solve my problem here. And by the way here’s a screen shoot of my .htaccess and template groups collections, in case anyone wondering what I’ve struggling so far. So, have I missed any further steps here there, or perhaps even have to tweak the .htaccess a little bit more? Anyone with enlightenments are welcomed to help. Many thanks.
