Welcome Guest, Not a member yet? Register   Sign In
mod_rewrite, index.php etc
#1

[eluser]andychurchill[/eluser]
My local dev server has the following structure:

C:\apache\htdocs\myproject\system
C:\apache\htdocs\myproject\application
C:\apache\htdocs\myproject\public_html\index.php

my config file has:

$config['index_page'] = "";

and I don't know if it's relevant, but I also have:

$config['url_suffix'] = ".htm";

The problem is, when I try and access anything other than the homepage, while watching the http requests, I've noticed it's very slow, and returns 404, but still renders the page eventually. I realised it's because my htaccess handles 404s and redirects back to the index.php page, which is why it works, eventually. My question is, based on the structure above, what would I change to fix this, so that it works for all my other urls without first returning a 404 and redirecting back to index.php? I'm planning to mirror this directory structure above on my live server, so whatever the issue is, it will probably solve the problem on there as well.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule>


Messages In This Thread
mod_rewrite, index.php etc - by El Forum - 01-19-2010, 05:37 PM
mod_rewrite, index.php etc - by El Forum - 01-19-2010, 06:21 PM
mod_rewrite, index.php etc - by El Forum - 01-19-2010, 07:12 PM
mod_rewrite, index.php etc - by El Forum - 01-19-2010, 07:35 PM
mod_rewrite, index.php etc - by El Forum - 01-19-2010, 07:41 PM
mod_rewrite, index.php etc - by El Forum - 01-19-2010, 07:48 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 04:44 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 05:02 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 05:29 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 05:46 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 06:31 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 06:51 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 07:05 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 07:28 PM
mod_rewrite, index.php etc - by El Forum - 01-20-2010, 09:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB