1

This is the content of my .htaccess file:

php_flag allow_url_fopen on

DirectoryIndex index.php

<ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>

<IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk    Yes
    mod_gzip_item_include file    \.(html?|txt|css|php|js)$
    mod_gzip_item_include handler   ^cgi-script$
    mod_gzip_item_include mime      ^text/.*
    mod_gzip_item_include mime      ^application/x-javascript.*
    mod_gzip_item_exclude mime      ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A86400
    ExpiresByType image/png A2419200
    ExpiresByType image/jpg A2419200
    ExpiresByType image/jpeg A2419200
</IfModule>

AuthName domain.com
ErrorDocument 404 /404.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule ^(.*)$ http://www.domain.com.ar/$1 [R=301,L]

RewriteRule index.html$ Controlador/index.php [L]
</IfModule>
AddHandler php5-script .php

I want index.html (which does not exist) to be redirected to my controller. index.php (which exists) should be my home page.

Now, my homepage is not working when typing http://www.domain.com/ in my browser. That URL redirects to my controller. http://www.domain.com/index.php works fine, bringing my homepage.

How do I set index.php as my index file keeping my redirection for the controller?

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
Gerardo
  • 111
  • 3

1 Answers1

1

You could try:

Options +FollowSymLinks 
RewriteEngine on 
Redirect 301 /index.html http://www.domain.com.ar/Controlador/index.php
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com.ar/$1 [R=301,L]
Grizly
  • 2,063
  • 15
  • 21