Welcome Guest, Not a member yet? Register   Sign In
1and1 not redirect htacces / route.php

I'm using CodeIgniter for my website.

The pattern of CI to write the URL is:
e.g: http://mydomain.com/class/function/id
My case: http://mydomain.com/index.php/msg_controller/insert

But I want to use a customized routing as follows:
e.g: http: //mydomain.com/alias
My case: http://mydomain.com/contact

I wrote this:
PHP Code:
$route['contact'] = 'index.php/msg_controller/insert'

In my localhost, it works perfect. But 1and1 fails and can not find the page.
The service told me that the best use ".htaccess" file. But not works for me. I've tried a thousand methods.

mod_rewrite is active in my Apache. I've done some tests:
RewriteEngine On
RewriteRule test.html http://www.google.es [R]

My .htaccess file currently only has:
RewriteEngine On
RewriteBase /

Neither this works:
RewriteEngine On
RewriteBase /
RewriteRule  ^contact$ index.php/msg_controller/insert

I do not want only to hide 'index.php', I want to customize the url! 

Can you help me?
Thank you

This works for me:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Theme © iAndrew 2016 - Forum software by © MyBB