?
Solved

.htaccess and ExpressionEngine

Posted on 2013-11-26
2
Medium Priority
?
319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

777 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