EduardoRamos Moderador
Posts : 19 Localização : Na frente do Meu Notbook Registrado em : 08/05/2010
| Assunto: [TUT]Tirando extenção .php dos arquivos[/TUT] 08/05/10, 08:01 pm | |
| Quer tirar as extenções .php dos seus arquivos?É super simples siga este tutorial:
- Vá na pasta onde está o seu CMS e abra/ou crie o arquivo ".htaccess"
- Após abrir/ou criar coloque isso:
- Código:
-
RewriteEngine On # Esta página é essencial para o funcionamento das URLs sem o .php (mas só irá funcionar caso o mod_rewrite esteja ativado) # RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteRule ^groups/(.*)/id/discussions/(.*)/id/page/(.*) ./viewthread.php?thread=$2&page=$3 RewriteRule ^groups/(.*)/id/discussions/(.*)/id ./viewthread.php?thread=$2 RewriteRule ^groups/(.*)/id/discussions ./group_forum.php?id=$1 RewriteRule ^groups/(.*)/id/BadgeUpdated ./group_profile.php?id=$1&x=BadgeUpdated RewriteRule ^groups/(.*)/id ./group_profile.php?id=$1 RewriteRule ^groups/(.*) ./group_profile.php?name=$1 RewriteRule ^credits/habboclub/tryout ./tryout.php RewriteRule ^credits/habboclub ./club.php RewriteRule ^credits/pixels ./pixels.php RewriteRule ^credits/request ./habblet/ajax_requestcredits.php RewriteRule ^credits/gamble ./gamble.php RewriteRule ^credits/more ./more.php RewriteRule ^credits/history ./history.php RewriteRule ^credits/furniture_news ./furniture_news.php RewriteRule ^credits/shop_badge ./shop_badge.php RewriteRule ^credits/shop_furni ./shop_furni.php RewriteRule ^credits/collectables ./collectables.php RewriteRule ^articles/archive$ ./news.php?archive=true [QSA] RewriteRule ^articles/archive?pageNumber=(.*)$ ./news.php?archive=true&pageNumber=$1 RewriteRule ^articles/category/(.*)$ ./news.php?category=$1 RewriteRule ^articles/rss.xml$ ./xml/rss.php RewriteRule ^articles/(.*)-(.*)/in/category/(.*)$ ./news.php?id=$1&category=$3 RewriteRule ^articles/(.*)-(.*)/in/archive$ ./news.php?id=$1&archive=true RewriteRule ^articles/(.*)-(.*)$ ./news.php?id=$1 RewriteRule ^articles ./news.php RewriteRule ^account/submit ./habblet/submit.php RewriteRule ^account/reauthenticate ./reauthenticate.php RewriteRule ^account/password/forgot ./forgot.php RewriteRule ^account/logout_ok ./logout.php RewriteRule ^tag/search?tag=(.*)$ ./tags.php?tag=$1 [QSA] RewriteRule ^tag/(.*)$ ./tags.php?tag=$1 [QSA] RewriteRule ^tag$ ./tags.php [QSA] RewriteRule ^home/(.*)/edit$ ./user_profile.php?do=edit&name=$1 RewriteRule ^home/(.*)/id$ ./user_profile.php?id=$1 RewriteRule ^home/(.*)$ ./user_profile.php?name=$1 RewriteRule ^add/id/(.*)$ ./myhabbo/friends_add.php?id=$1 RewriteRule ^help/(.*)$ ./help.php?id=$1 RewriteRule ^help$ ./help.php RewriteRule ^profile/friendsmanagement ./profile.php?tab=8 RewriteRule ^profile/securitysettings ./profile.php?tab=9 RewriteRule ^client_popup/(.*)$ ./clientutils.php?key=$1 RewriteRule ^client_(.*)$ ./clientutils.php?key=$1 [QSA] RewriteRule ^captcha.jpg$ ./captcha/captcha.php RewriteRule ^papers/(.*)$ ./paper.php?page=$1 RewriteRule ^habbo-imaging/avatar/(.*),(.*),(.*).gif$ ./cache/avatars/$1,$2,$3.png RewriteRule ^habbo-imaging/badge-fill/(.*).gif$ ./cache/badges/$1.gif RewriteRule ^iot/go$ ./go.php RewriteRule ^community/staff ./staff.php RewriteRule ^community/competitions ./competitions.php RewriteRule ^community/applications ./applications.php RewriteRule ^register/welcome ./welcome.php RewriteRule ^register/p/(.*) ./register.php?p=$1 RewriteRule ^register/cancel ./register.php?do=cancel RewriteRule ^register/back ./register.php?do=back RewriteRule ^register_submit ./habblet/register_submit.php RewriteRule ^register_messages ./habblet/register_messages.php RewriteRule ^discussions/(.*)/id/page/(.*) ./viewthread.php?thread=$1&page=$2 RewriteRule ^discussions/(.*)/id ./viewthread.php?thread=$1 RewriteRule ^discussions ./forum.php RewriteRule ^(.*)/(.*)/habblet/quickmenu.php ./habblet/quickmenu.php
RewriteRule ^(web-gallery) - [L] Após colar, feche e salve-o. Agora este passo só será necessário se você não tiver o mod_rewrite ativado:
- No arquivo Conf/httpd.conf, procure pela linha:
- #LoadModule rewrite_module modules/mod_rewrite.so
- Depois tire o "#" da linha
- Procure também pela linha:
- AllowOverride None
- Mude para AllowOverride All.
Pronto seus arquivos agora não tem mais a extensão .php | |
|
4pizzas Habbos Gold
Posts : 200 Idade : 27 Localização : em frente o pc Registrado em : 11/10/2010
Ficha de prsonagem Nivel: 12
| |
Osmar Habbos Membro
Posts : 57 Idade : 26 Localização : rio de janeiro Registrado em : 17/10/2010
| Assunto: Re: [TUT]Tirando extenção .php dos arquivos[/TUT] 18/10/10, 08:55 pm | |
| | |
|
Mjkayo Habbos Silver
Posts : 111 Idade : 25 Localização : Aki! Registrado em : 12/11/2010
| Assunto: Re: [TUT]Tirando extenção .php dos arquivos[/TUT] 12/11/10, 06:39 pm | |
| Cara vlw,vou tentar fazer assim! | |
|
4pizzas Habbos Gold
Posts : 200 Idade : 27 Localização : em frente o pc Registrado em : 11/10/2010
Ficha de prsonagem Nivel: 12
| Assunto: Re: [TUT]Tirando extenção .php dos arquivos[/TUT] 03/01/11, 06:22 pm | |
| | |
|
sitelixoman Habbos Membro
Posts : 4 Registrado em : 02/03/2014
| Assunto: Re: [TUT]Tirando extenção .php dos arquivos[/TUT] 02/03/14, 11:39 am | |
|
|
| |
|
Conteúdo patrocinado
| Assunto: Re: [TUT]Tirando extenção .php dos arquivos[/TUT] | |
| |
|