Solved

.htaccess and ExpressionEngine

Posted on 2013-11-26
2
299 Views
Last Modified: 2013-12-04
I’m working on a project at home and have created this template directory structure (I have the site.group set to default):
expressionengine    
    templates    
        default_site    
            cursos.group    
                index.html    
            programas.group    
                index.html    
            testimonales.group    
                index.html    
            site.group    
                index.html  

Open in new window

But, EE will not serve the index in any group except site.group.  (I am running on Wampserver 2.2 localhost port 8040)
So my urls:
http://localhost:8040/cursos 
http://localhost:8040/programas
http://localhost:8040/testimonales

Open in new window

all return a 404. I CAN however, use these urls:
http://localhost:8040/index.php/cursos 
http://localhost:8040/index.php/programas
http://localhost:8040/index.php/testimonales

Open in new window

The .htaccess I have looks like this (from the EE manual):
<IfModule mod_rewrite.c>
        RewriteEngine On
        # Removes index.php from ExpressionEngine URLs
        RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

Open in new window

I have even tried this .htaccess (essentially copying to one from Rackspace with some changes):
RewriteEngine On
RewriteCond $1 ^(cursos|programas|testimonales) [NC]
RewriteCond $1 !^(images|js|crmi_cms|css|themes|favicon\.ico|robots\.txt|files|index\.php) [NC]
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]

Open in new window

I also have the “Admin->General Configuration->Name of your site’s index page” set to blank.

Any ideas
0
Comment
Question by:EddieShipman
  • 2
2 Comments
 
LVL 26

Accepted Solution

by:
EddieShipman earned 0 total points
ID: 39695253
This finally worked. I double checked that mod_rewrite was installed, too.

# Removes index.php from ExpressionEngine URLs
RewriteEngine On
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond $1 !^(admin|images|system|themes|index\.php|admin\.php) [NC]
RewriteCond $1 ^(cursos|programas|testimonales|salondelafama|enhonor|registro|resources|calendario|TNA) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]

Open in new window

0
 
LVL 26

Author Closing Comment

by:EddieShipman
ID: 39695255
Self-answered
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now