0

Hi all I have been developing a site using CodeIgniter without any issue, I am now hoping to move my site and make it live so to speak, I have updated the base URL and can access my login page without an issue, I also inlcuded the following .htaccess file:

<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /livesystem/ # Removes index.php from ExpressionEngine URLs RewriteCond %{REQUEST_URI} ^system.* RewriteRule (.*?)$ /index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^application.* RewriteRule (.*?)$ /index.php?/$1 [L] # Directs all EE web requests through the site index file RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /index.php </IfModule> 

however when I was working with localhost the following lines in CI would work without an issue: redirect('main');

however when this runs on my live site I am receiving the following page back Not Found

404 Not Found: The requested URL /livesystem/index.php was not found on this server. 

I have checked that the index.php is infact within my codeigniter root folder and it is - has anyone got any ideas? - I guess this is something really simple that I have missed. Any help would be much appreciated

1 Answer 1

1

Do you set the $config['base_url'] as your domain name in .htaccess file change the last line as like this

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

i will it's work

Sign up to request clarification or add additional context in comments.

2 Comments

I will give it a try thanks for the suggestion - I still get the same error unfortunately
could you give me an example htaccess for example if the base url was test.com/user1

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.