K Davis
K Davis

Reputation: 121

CodeIgniter 404 Page Not Found htaccess wamp

I'm working on a CodeIgniter application that was previously developed.

The issue that I'm getting is a page not found and I have installed on wamp.

Here is the .htaccess file that I'm currently using for the app (not the wamp one).

    # Turn on URL rewriting
    RewriteEngine On

    # Allow these directories and files to be displayed directly:
    RewriteRule ^(index\.php|css|js|fonts|images|uploads|audio) - [PT,L]

    # Rewrite all other URLs to index.php/URL
    # RewriteRule .* index.php?/$0 [PT,L,QSA]

    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

How do I go about fixing the 404 issue? Would I change the wamp .htaccess file?

Thank you, Kevin Davis

Upvotes: 1

Views: 928

Answers (2)

BEingprabhU
BEingprabhU

Reputation: 1686

Try using below .htacccess file.

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

Hope this can help you.

Upvotes: 0

Himanshu Upadhyay
Himanshu Upadhyay

Reputation: 6565

# Turn on URL rewriting
RewriteEngine On
RewriteBase /FOLDERNAME/    #Add your foldername in place of FOLDERNAME

# Allow these directories and files to be displayed directly:
RewriteRule ^(index\.php|css|js|fonts|images|uploads|audio) - [PT,L]

# Rewrite all other URLs to index.php/URL
# RewriteRule .* index.php?/$0 [PT,L,QSA]

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

Upvotes: 1

Related Questions