Solved

.htaccess and ExpressionEngine

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

Suggested Solutions

Title # Comments Views Activity
change password links 7 74
Php Email function not working with Template 8 38
Session timeout 5 15
javascript date picker in php while loop 5 28
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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…
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…

863 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

24 Experts available now in Live!

Get 1:1 Help Now