I have root file and in root file public => index.php.I created .htaccess in root and wrote this code
RewriteEngine on RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L] to redirect from root to public/index.php but it is not working. localhost is wamp(apache)
root file public? That could mean anything, please show exact folder structure.htaccessfile in in thecodefolder and not thepublicfolder. I would guess that thepublicfolder is yourDocumentRootor at least it probably should be