[SHARE] Pretty Good URL dengan .htaccess


Status
Not open for further replies.

mlutfiup

Hosting Guru
Buat file simpan dengan nama .htaccess

Code:
RewriteEngine on
RewriteRule masuk$ modules/main/contollers/login.php

Letak file: modules/main/contollers/login.php
Pemanggilan : https://domain/masuk , tidak ada extensi .php atau .html lagi dibelakangnya

Sekian
 

dhyhost

Web Hosting Service
The Warrior
Verified Provider
apa ini?
 

Zidan Pragata

Poster 2.0
# ----------------------------------------------------------------------
# Htaccess Authentication
# Gunakan password generator .htpasswd
# http://aspirine.org/htpasswd_en.html
# ----------------------------------------------------------------------
AuthType Basic
AuthName "Auth by PAIJO-PAIJEM"
AuthUserFile /path/to/.htpasswd
Require user exampleusername
# In the .htpasswd just write the output from the Password Generator:
exampleusername:$apr1$8cah0v1u$TDjVh0

# ----------------------------------------------------------------------
# Http to Https
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# ----------------------------------------------------------------------
# www to non-www URLs 301 Redirect
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.paijo-paijem.com$
RewriteRule (.*) https://paijo-paijem.com/$1 [R=301,L]
</IfModule>

# ----------------------------------------------------------------------
# Slash to Non-Slash URLs 301 Redirect
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
</IfModule>

# ----------------------------------------------------------------------
# Pages With to Without Extension (php|html|htm) 301 Redirect
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/?(.*).(php|html|htm)$ /$1 [R=301,L]
</IfModule>

# ----------------------------------------------------------------------
# Page to Parent Directory 301 Redirect
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine on
Redirect 301 /1/2/3/blog.php /1/2/3
</IfModule>
 

dhyhost

Web Hosting Service
The Warrior
Verified Provider
mantap, suhu2 berdatangan dan saya makin ga ngerti :41:
 

epadicom

Apprentice 2.0
Verified Provider
Para suhu sedang share ilmunya, mari kita apresiasi sampe rusuh, kalo kira2 udh mulai stresss... pause bentar.
 
Status
Not open for further replies.

Top