I want to run the codeigniter project which I am currently working on in localhost I setup each and everythng accordingly
$config['base_url'] = 'http://localhost/site';
$config['index_page'] = '';
its works fine in my office but when i bought it home to work more on off days I started getting errors it only shows the home or index page and when i navigate to other pages it displays 404 object not found
just displays the home page all the other routes not working
please help
Reasons can be
You might have copied the code in different CodeIgniter version.
Some code standard differs from version to version.
Might be because of database.
Create .htaccess file and put below code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Related
I have downloaded and using Codeigniter 3.1.11.
I have copied the same to as usual htdoc folder.
Tomcat is Binary Installed and service running and able to get
the Welcome page with http://localhost/CodeIgniter3111/index.php/welcome.
I have inserted in .htaccess as below.
RewriteEngine On
RewriteCond $1 !^(index\.php|assets|images|js|css uploads|fevicon.png)
RewriteCond %{HTTP_COOKIE} ais=([a-z0-9-_]+)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-f
RewriteBase /CodeIgniter3111/
RewriteRule ^(.*)$ ./index.php/$1 [L]
and also removed the index.php from Config.
$config['base_url'] = 'http://localhost/CodeIgniter3111'; and added the base url as well.
As I type in url (http://localhost/CodeIgniter3111/welcome), I am
getting below error in browser.
Not Found
The requested URL /CodeIgniter3111/welcome was not found on this server.
I appreciate support in advance.
$config['base_url'] = 'https://localhost:8888/Your folder name';
your port number should be there
I am having a problem after hosting my codeIgniter project on live shared hosting server.
Before doing that, I changed few things on my local server.
.htaccess file-
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
.config.php inside config folder-
$config['base_url'] = '';
$config['index_page'] = '';
to let it work properly on my local server without writing index.php in URL. But when I moved it to live server, I changed base_url as-
http://crm.sachinartani.com
as I am hosting it on my subdomain, but it always output-
404 Page Not Found
The page you requested was not found.
I watched all videos on YouTube and traversed all questions of StackOverflow but none of the solutions helped me. There is a folder aside application folder namely inc which contains CSS and JS files I am using in my project. I am able to access those files by URL as - http://crm.sachinartani.com/inc but I cannot access any controllers and views like this.
I have gotten a live chat system written in codeigniter, and I want to integrate my WebSite, which is written in Cakephp him.
I installed the "/ livechat" folder webroot, I modified the livechat file / application / config / config.php and I put :
$config['base_url'] = 'http://exemple.com/livechat/';
Then I modified the .htaccess file in the folder "/livechat" :
RewriteEngine On
RewriteBase /livechat
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1
But when I run the live chat with the address "http://exemple.com/livechat/" I get an error: 404 Page Not Found
Can someone help me please?
thank you in advance
I build codeigniter project and i have tested it in my local machine using http://works.dev/rcsoft as base url. I upload that project to cpanel and my new url like http://testsomeone.org/rcsoft. Home page is working.
But it is not working for other controller page such as http://testsomeone.org/rcsoft/person. It is giving
Not Found
The requested URL /index.php/person was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
But it working for http://testsomeone.org/rcsoft/index.php/person
my .htaccess file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
My config.php
$config['base_url'] = 'http://testsomeone.org/rcsoft/';
$config['index_page'] = '';
Please help me. What is the issue?
First open up application/config/config.php file and edit line #17 as the example below:
$config['base_url'] = 'http://testsomeone.org/rcsoft/';
Second, insert the following line right after RewriteEngine On in .htaccess file:
RewriteBase /rcsoft/
Is it working fine in your local machine?..if so then just change the details in routing file..then try ..
I am still new to magento but I have been slowly making progress on replicating the production environment to a sandbox environment.
The issue I am currently running into is that when I go to my site I get a long url rather than a short optimized url. I am guessing it is a configuration setting that I need to change as well as, I went through and had to add index.php to the url string for it to work properly.
What I want to be able to do is use a short url such as /category/page.html rather than catalog/category/view/s/power-tools/id/261/
Thank you in advance!
This is probably because you need to reindex Catalog URL Rewrites. Go to System->Index Management and reindex. (It's probably best to select all and reindex though just to be sure!)
After working through this, I ended up changing the .htaccess Mage::run() settings. I ended up having to change some of the base url setting in the core_data_config table to finish getting everything to work correctly. I also ended up having to set the SEO rewrites (System Config > General > Web > Search Engine Optimization > Use Web Server Rewrites) = No
I found that once index.php was included in the path then my site was working properly.
This is what i ended up doing and it removed the index file as well. Part of the issue is that I installed magento in /store/dir/
1) Login to admin section by using the URL
http://domain.com/index.php/admin
2) then go to “System >> Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES
3) Go to “System >> Configuration >>Web >>Secure”
Use secure URL Frontend: YES
** I used the second one **
4)Then create the .htaccess file under your the magento installed folder.
If the magento installed under document root ( /home/username/public_html) then add follogig rules into .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
and If the magento installed under /shop or directory then add the following rules into ” /home/username/public_html/shop/.htaccess ” file.
<IfModule mod_rewrite.c >
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule >
http://www.bestdesigns.co.in/blog/remove-index-php-url-magento