Caro Visitante!

Registe-se no fórum ou faça login, para ter total acesso ao fórum.
forumjovem.com
Caro Visitante!

Registe-se no fórum ou faça login, para ter total acesso ao fórum.
forumjovem.com

Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

#1
 DarkCode

DarkCode
Administrador
Administrador
Falae # Shift-!

Estou aqui postando pra você um tutorial muito legal, você está cansado de ter aqueles malditos ".php" no final do link né?

Sim, como tira?

Isso, perguntou pra um cara certo!

Vamos lá!!!

Primeira mente você terá que ter os seguintes programas:

Xampp 1.6.8 ou Vertrigo 2.2.6
Um CMS que contenha ".php" nos links!

Agora é o seguinte, você vai na pasta do "CMS" e abre o ".htaccess"

Após abrir, apague tudo o que tiver escrito e cole isso:
Código:
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php
Options  FollowSymlinks
Options -Indexes

deny from all

order allow,deny
deny from 65.18.169.227
allow from all

  php_value zlib.output_compression 16386
  php_value register_globals off
  php_value session.use_trans_sid 0
  php_value default_charset iso-8859-1
  php_value exif.encode_unicode iso-8859-1


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 vamos ativar o mod_rewrite !

Para ativar o mod_rewrite no apache(ele vem desativado por padrão) faça o seguinte

No arquivo Conf/httpd.conf, procure pela linha:

#LoadModule rewrite_module modules/mod_rewrite.so

e descomente removendo o símbolo “#” do início da linha para ficar assim:

Procure também pela linha

AllowOverride None

e altere para

AllowOverride All

Créditos:

Texto - # Shift-
.htaccess - HambbyCMS r1

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]


Permissões neste sub-fórum
Não podes responder a tópicos