Welcome Guest, Not a member yet? Register   Sign In
.htaccess question: 404 Results from Different Paths on Server vs. Localhost?

I'm moving my app to a new web host and have to resolve some questions about pathing.

On my localhost dev environment, everything is working. Here is the folder layout:

Quote:Root Directory 
--System Folder
--Application Folder

Here is the folder layout on my web host:

Quote:Root Directory
--xyz folder
----System Folder
----Application Folder

If I visit the following URL in my browser, I get a 404 error:


Is there a way to correct this via .htaccess?

Thanks very much in advance to all for any 

Is the 404 from codeigniter or from the webserver?

Thanks for the reply, Paradinight.  I solved this. There were two things I had to do. First I had to move my .htaccess file into the folder that contained index.php. Next, I had to edit config.php and change:

PHP Code:
$config['url_suffix'] = "html"


PHP Code:
$config['url_suffix'] = ""

On my previous web host this was fine, but on this new web host (Dreamhost), a url_suffix of "html" appears to break the app.

(This post was last modified: 08-23-2015, 09:37 PM by phplaw.)

The problem is because of  you dont have file .htaccess in xyz or you have but It only works on root directory, please read document guide or search google for creating .htaccess for Codeigniter,
then you will find some articles about creating, configuration for that file, place It in /xyz/ folder, then You have to modify your .htaccess file to run CI from any directory (include subdirectories)
RewriteRule ^(.*)$ /index.php/$1


RewriteRule ^(.*)$ ./index.php/$1

If you follow my instruction then I think you will be ok.
Another way is add index.php in your url
P/S: make sure mod rewrite (htaccess) has been turned on your server.

Theme © iAndrew 2016 - Forum software by © MyBB