Welcome Guest, Not a member yet? Register   Sign In
Stuck with mod rewrite
#1

[eluser]tiono[/eluser]
Desperately need help.

My webroot structure :

images/
include/
webadmin/ (CI folders & files inside here. I have css, images, public, system, test, tmp, and index.php)
webmail/
index.php

my config.php

$config['base_url'] = "http://www.myweb.com/webadmin/";
$config['index_page'] = "";
$config['uri_protocol'] = "AUTO";

my routes.php

$route['default_controller'] = "welcome";

It suppose to work like this :
1. When I point to www.myweb.com, I should get my website page (works already without changing anything).

2. When I point to http://www.myweb.com/webadmin, then should be redirect to http://www.myweb.com/webadmin/welcome/verify if user not login yet. I redirect using redirect("welcome/verify","refresh");

Next I already put .htaccess file in my webroot. content is :

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /webadmin/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php/$1 [L]
</IfModule>

Next I try accessing http://www.myweb.com/webadmin, and I was redirect to
Code:
http://www.myweb.com/webadmin/ //www.myweb.com/webadmin/welcome/verify
In address bar after webadmin is % and 20 and then followed by //www.myweb.com. Why is it like that?

Next I try accessing directly http://www.myweb.com/webadmin/welcome/verify but what i see is my website index.php

Then I tried modified .htaccess become :

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /webadmin/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /webadmin/index.php/$1 [L]
</IfModule>

After modified, If I type http://www.myweb.com/webadmin/welcome/verify, I can see my login form. When I enter correct login information, then page redirect to
Code:
http://www.myweb.com/webadmin/welcome/ //www.myweb.com/webadmin/packages
which is wrong again.

It's really strange that I can get it work at my local computer with similar setup, but when I publish it on my webhosting, it is not working at all.

I've search and read a lot about mod_rewrite in CI, but still couldn't find the solution.

Somebody please tell me what should I change to make the website works correctly.


Messages In This Thread
Stuck with mod rewrite - by El Forum - 10-22-2008, 11:32 AM
Stuck with mod rewrite - by El Forum - 10-22-2008, 11:43 AM
Stuck with mod rewrite - by El Forum - 10-22-2008, 11:49 AM
Stuck with mod rewrite - by El Forum - 10-22-2008, 05:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB