Arpita
Arpita

Reputation: 1398

modrewrite not working on wamp server

mod rewrite is not working with wampserver. My .htacess file is as follow

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    public/    [L]
    RewriteRule    (.*) public/$1    [L]
</IfModule>

when I remove and from starting an ending it says internal server error but when I keep them it doesn't effects any thing asif it doesn't got into the tag what I

Want to do is redirect the URL from a folder Say MVC to a sub folder say MVC/public

Upvotes: 0

Views: 401

Answers (1)

anubhava
anubhava

Reputation: 785631

Try this code in

RewriteEngine On
RewriteBase /MVC/

RewriteCond %{REQUEST_URI} /public/ [NC]
RewriteRule (.*) public/$1 [L]

Upvotes: 2

Related Questions