Reputation: 121
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
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
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