By removing the index.php prefix in wampserver windows, is it possible?

Asked

Viewed 501 times

1

It is possible to remove the prefix index.php in my local projects using wampserver? inserir a descrição da imagem aqui

  • Leo, you got a negative (not from me) probably because you lack details in your answer. I suggest you improve the explanation.

  • @Wallacemaxters the question is very clear in my view, remove ". php" from the URL.

  • Yeah, it’s clear to me, too, because I’ve had the problem. But maybe it’s unclear to the person who gave the negative, or to someone who might face the same problem.

1 answer

1

Yes, it is possible.

You need to change the .htaccess and check whether the mod_rewrite is active.

In htaccess you put like this:

RewriteEngine On

RewriteRule ^(.*)$ index.php/$1

Remembering that, as you are using the wamp, you will probably have to enable the mod_rewrite of your apache.

To enable mod_rewrite, use the instructions as shown below:

inserir a descrição da imagem aqui

After that, I think you also need to restart your wamp server.

  • You could add in the answer how to enable apache mod_rewrite using wamp, just as an add-on. But if he knows how to do that I think the problem is solved.

  • @Filipemoraes think it does. The only problem is that I use Ubuntu. Maybe I can do it by virtualbox (when I get home today)

  • Thank you very much, Wallace Maxters. Problem solved just by activating rewrite_module

Browser other questions tagged

You are not signed in. Login or sign up in order to post.