Hi:

I have a website up and running based on CodeIgniter. It works fine online. But the mod rewrite is not working on my local PC.

I'm running Apache/2.2.10 (Win32) with PHP/5.3.5.

The phpinfo shows that mod_rewrite is loaded .

I look in the apache config and it is loaded (un-commented) there too.

This is what I have in my .htaccess file:

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

This is becoming an issue as I can not test my pages locally before going live.

Your help is greatly appreciated. thanks

Kamy

    Do any other Apache directives work in the .htaccess file? For example, if you do something like:

    Order Allow,Deny
    Deny from All

    do you get an error page when trying to view any page?

      Firstly , to be honest, I don't know how to test if

      Order Allow,Deny
      Deny from All
      

      works or not !

      My website does work online with the .htaccess I have, on the local I do get a 404 error when clicking a link :

      The requested URL /en was not found on this server.
      

        Your local apache server may not be configured to allow the use of .htaccess files. Sadly, I don't know Apache commands all that well, but you might want to check out the AllowOverride directive. If your server is not configured to allow the use of .htaccess files, then you'll need to add this directive to the relevant <Directory> section in your apache configuration file.

        To test whether .htaccess files are in effect, you might try putting some kind of auth-required directive in.

          Thanks sneakyimp !

          That was the pointer I needed !

          AllowOverride was set to none.

          all ok now !

          tx

            Write a Reply...