user3968645
user3968645

Reputation: 135

Codeigniter Installation Moved

I recently moved my codeigniter application from a subdomain to operate under my domain.

Basically I moved it from:

https://account.mywebsitehere.com

To:

https://mywebsitehere.com/account

Now when I try to access anything like /invoices it removes the /account from the url and results in a not found page. I have changed the base url in the config file but it is still resulting in this error.

Other than going through the entire application and changing every link to be /account/... How can I make the application work under the /account in the url?

My .htaccess file located at public_html/panda/.htaccess is as follows:

RewriteEngine on
RewriteCond $1    
!^(index\.php|robots\.txt|files\/images|files\/css|files\/js|files\/swf|files\/upload)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://mywebsitehere.com/panda/$1 [R,L]\

Upvotes: 0

Views: 44

Answers (3)

Lokesh Jain
Lokesh Jain

Reputation: 579

just put that code in .htaccess file and try it

RewriteEngine On
RewriteBase /account/
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Upvotes: 0

VeeeneX
VeeeneX

Reputation: 1578

Try to change base_url to:

$config['base_url'] = 'https://mywebsitehere.com/account';

Upvotes: 1

Y.E
Y.E

Reputation: 1

first, upload an image to the root directory and see if you can access it within the browser. if you cant access it , check your server's configuration and your .htaccess file.

Upvotes: 0

Related Questions