404 page not found error after joomla website migration - joomla

I have been transfer all file from old server to the new server.
Also the old server database to new server database. This new server for example http://server.com/newserver same like http://oldserver.com. But the main menu or article show 404 not found. Below are my configuration.php
public $log_path = '/home/public_html/newserver/logs';
public $tmp_path = '/home/public_html/newserver/tmp';
public $user = 'new_user';
public $password = '812tq3iurhb';
public $db = 'new_db';
public $dbprefix = 'ybqsn_';
public $live_site = '';

This problem solve after go to global setting and disable SEO url and rewritting

Hello it seems to be a htaccess problem, check if the .htaccess have been copied to the new server or check with your hosting provider the correct RewriteBase configuration

This is an old issue but i resolved this by modifying .htaccess file and enabled RewriteBase /

Related

Codeigniter Manage URL With Routes

I'm just starting a new saas project alone and I'm stuck in Codeigniter's URI configuration.
I'm using xampp, and so far I have a folder with my site in it with it's own database.
If a client register to my product a new subfolder will be generated also new database will be generated related to this client.
The main URL is as ex: (http://localhost/gms/admin) but how to manage urls from clients like this : (http://localhost/gms/client1/admin) .... etc and after client log with his new specific url it SHOULD load the related database.
I Took time to solve it. Please need it necessary.
in routes.php
$route['gms/(:any)/admin'] = 'gms/admin';
in gms controller
public function admin(){
$client = $this->uri->segment(2);
echo $client;
}

Codeigniter url changes from 'localhost' to 'http://127.0.0.1/'

https://stackoverflow.com/a/29562910/4713946
This is my problem, and I am not sure about the answer. I am unsure where I put this code. I cannot comment on the post itself as I do not have enough reputation so I have to start a new thread. /:
Can someone maybe help me out.
I do a redirect() and when I do this, the 'Localhost' changes to '127.0.0.1'
So turns out all I had to do was change 'base_url' in 'config.php' file:
$config['base_url'] = '';
to
$config['base_url'] = '/';
You should set your base url if your using codeigniter 3 versions
$config['base_url'] = 'http://localhost/yourproject/';
If base url is blank it codeigniter 3 versions will show ip_address in url instead of localhost.

codeigniter baseurl not working

I am using the baseurl() in my application. ex: "http://www.edocapp.in"
This is working in case if we type domain name with "www" but not working if I use "only http".
Application is hosted on server.
try
$config['base_url'] = 'http://www.edocapp.in';
this
Base URL should have / in the last char:
$config['base_url'] = 'http://www.edocapp.in/';
anyway, you should check your DNS record in your server/hosting.
Does it have an alias (CNAME Records) to redirect www.edocapp.in to edocapp.in ?

Unable to run the app on hosted server

I have just installed Ci framework and tried on my local some basics according to the tutorial.
http://ellislab.com/codeigniter/user-guide/tutorial/static_pages.html
On local machine, everything was OK and page was displayed.
Than I upload project to the server (I am using wedos web hosting where I already have som web which is working correctly) but this is not working for the application which I copied it here. When I type the URL I got 404 error.
On my webhosting service I have www folder where i put my index.html file. Than when i type www.mydomain.eu I get this index.html file. Than I have subfolder www/folder/index.html Than when i type www.mydomain.eu/folder i get this page so it is ok.
Than i have www/folder2/here i unzip CodeIgniter framework and when i type www.mydomain.eu/folder2, 404 Page Not Found appears. The error is not general error from browser but generated from the CI framework.
I have created my own controler in application/controllers/mycontroller.php
<?php
class Mycontroller extends CI_Controller {
public function view($page = ‘enter_form’)
{
$data[‘title’] = ucfirst($page); // Capitalize the first letter
$this->load->view(‘templates/header’, $data);
$this->load->view(‘pages/’.$page, $data);
$this->load->view(‘templates/footer’, $data);
}
}
And I have following structure of views:
views/pages/enter_form.php
views/templates/header.php and footer.php
And the following settings:
1) $config[‘base_url’] = ‘’; but I have tried ‘http://mydomain.eu/’ and ‘http://mydomain.eu/www/’ or ‘http://mydomain.eu/www/folder2/’
2) $route[‘default_controller’] = ‘mycontroller/view’;
$route[’(:any)’] = ‘mycontroller/view/$1’;
Thank you for any help
Sounds to me like there is either a configuration issue or a rewrite issue going on. Do you have a .htaccess file in your CI root folder where your index.php file lives? Seeing that you are depending on the CI to pick up any uri and reroute it to a specific route, this might be the issue. I've ran into issues with this before on different hosts. Make sure mod rewrite is enabled and make sure your .htaccess is something similar to this:
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|assets|uploads)
RewriteRule ^(.*)$ /index.php/$1 [L]
Ok, so it seems like the typo somewhere, because when I used the default CI welcome pages, it works. So I will try to find the typo myself and i will see...

Problem with basepath or apppath in CodeIgniter with SSL - looking in wrong place?

I have an app in the main directory of my site at www.mysite.com and another development version of the same site in a subdomain http://dev.mysite.com. Both the public_html and dev_html directories are on the same level - ie. they are both contained within the same directory. When I access the dev site via http:// everything is fine - it displays as it should. However, once the user authenticates and the site switched to https:// the dev application starts looking at the controllers and views in the public_html directory. I have no idea why - all links, forms and redirects are relative so they shouldn't jump to the controllers and views in the public_html folder. Also, the URL continues to show https://dev.mysite.com/
Does anyone have any idea where I should start to look? The config.php file has all the correct values. Also, here is the auth_controller which extends the base controller.
class Auth_Controller extends My_Controller {
Public $auth;
Private $CI;
Public $auth_levels = Array();
function __construct()
{
parent::__construct();
$this->data['user_realname'] = $this->db_session->userdata('user_realname');
$this->auth = $this->db_session->userdata('userAuthLevel');
$this->CI =& get_instance();
$this->auth_levels = $this->CI->config->item('auth_levels');
if ($_SERVER['SERVER_PORT'] != 443)
{
redirect(uri_string(), 'location', TRUE);
}
}
}
Any help on how to debug this would be appreciated.
CodeIgniter version is 1.71.
Have you checked your virtual host configuration in the web server config? This can seems obvious, but in apache's virtualserver you need to specify the port, and ssl is falling into the default-ssl config.

Resources