[ASK] Redirect file menggunakan .htaccess ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zipcoi
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 2:55 am

[ASK] Redirect file menggunakan .htaccess ?

Post by zipcoi »

hi master.. gw mo nanya nih..

gw kan buat file .htaccess untuk redirect.. tapi kok ga jalan ya ?
nih skripnya:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^localhost\/coba\/$ [OR]
RewriteCond %{HTTP_HOST} ^http\:\/\/localhost\/coba\/$
RewriteRule ^.*$ "http\:\/\/localhost\/coba\/public\/" [R=301,L]
intinya: gw pengen semua URL yang ditulis dengan localhost/coba/ atau http://localhost/coba/ semuanya di redirect ke http://localhost/coba/public/

tapi kok ga jalan ya ? ada yang kurang ato salah ?

thx atas tanggapannya.. :D
Post Reply