Welcome Guest, Not a member yet? Register   Sign In
removing index.php in urls with 1and1.com hosting
#1

[eluser]loopymonkey[/eluser]
Just wanted to post for anyone else trying to solve this if you're using 1and1 hosting:

For this example I have codeigntiter in a directory called 'dev'. So http://mysite.com/dev/

.htaccess file located in dev root:
Code:
Options -MultiViews
RewriteEngine on
RewriteBase /dev
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php/$1 [L]

** notice the RewriteBase /dev above, be sure to change the name to whatever directory your codeigniter is in or it won't work.

Then be sure to edit:

config.php
Code:
$config['index_page'] = "";
$config['uri_protocol']    = "REQUEST_URI";

That's it.
#2

[eluser]zool2005[/eluser]
Thanks a lot, your solution worked like a charm !
#3

[eluser]easternsolo[/eluser]
hi, I have problem running CodeIgniter with 1 & 1, I have tried every solution ….but getting the same “404 Page Not Found , The page you requested was not found” page

my default folder is qapp for codeigniter

http://www.qhangers.com/qapp

The last setting .htaccess as follow (but still getting same result)

Code:
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

ErrorDocument 404 index.php

Please help!!
#4

[eluser]Onema[/eluser]
I'm experiencing a similar issue with a 404 error message.
I'm using CI 2.0.2 and I have a basic shared hosting with 1and1, and my .htaccess located in my website root (/mywebsite/.htaccess) directory and it looks like this

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
    
    AddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 index.php
</IfModule>

In my config.php file I have the following:

Code:
$config['base_url']    = 'http://mywebsite.com';

$config['index_page'] = '';

$config['uri_protocol']    = 'REQUEST_URI';

It doesn't matter what I do I keep getting the 404 page not found error : http://d.pr/F2KR

Help is greatly appreciated.




Theme © iAndrew 2016 - Forum software by © MyBB