Welcome Guest, Not a member yet? Register   Sign In
Rewrite URL

Hi guys,

I am developing a website for a client with CI framework.
I am using .htaccess to remove index.php from all the URLs within the site.
The site is almost finished and the client want to test it on their dedicated server.
So what I got from them is the server login with a dedicated IP address.

I have upload the website to the server, but there is no domain added to the server yet, so I got the link to the website is something like

The first page is coming up all fine, all images, text from database, everything is working.

But then I click on one of the menu to go to other page, eg

This error message comes up

404 Not Found

The server can not find the requested page: (port 80)

Please forward this error screen to's WebMaster.
Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ PHP/5.2.9 Server at Port 80

I have check and the mod_rewrite was enabled, so I have no idea how to solve this one.

If anyone have a clue, please help.

Thanks a lot

did you check your config.php, this line
$config['base_url'] = "";
to be as your server url

Yes, I did so

does it work if you call it like this

Thanks flaky, i appreciate your reply

Yes, it works sometimes if I put the index.php in the URL
The thing is in the whole website (all controller, view) I don't use index.php
So I don't really want to fix all the URL

Do you have any other idea?

what does your .htaccess look like and did you set your $config['index_page'] to be blank in config.php?

[quote author="Dyllon" date="1263273588"]what does your .htaccess look like and did you set your $config['index_page'] to be blank in config.php?[/quote]
Yes, I did that.

And my .htaccess

RewriteEngine on

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

Any other idea, please help
Thanks guys

[eluser]Rick Jolly[/eluser]
Try with the RewriteBase set like so:
RewriteEngine on
RewriteBase /~username/

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

Thanks Rick, you are my hero, works like a charm

Thanks a lot guys

Theme © iAndrew 2016 - Forum software by © MyBB