Jump to content
pluis3103

htacess e friendly url

Recommended Posts

pluis3103

Boas  pessoal,

Gostava de saber como fazer o htacess de modo a ele me re-escrever a url.

Ou seja, normalmente eu tenho urls do tipo ?p=1&id=14

Imaginemos que p=1 é uma noticia e id=14 é o id da noticia .

Como fazer as regras de modo a dizer que o url deve ser :

http://www.omeusite.com/noticias/14

Thanks

Share this post


Link to post
Share on other sites
scorch

Tenta assim:

RewriteEngine on

RewriteRule ^noticias/(.*)/              index.php?p=1&id=$1  [QSA,L]


PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.