Solved

.htaccess and ExpressionEngine

Posted on 2013-11-26
2
302 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

770 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