Kamis, 08 Agustus 2013

PHP Indonesia - Facebook: ijin bertanya, perihal htaccess redirect www to no...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
ijin bertanya, perihal htaccess redirect www to no...
Aug 9th 2013, 02:58, by Kawan Kuliah

Kawan Kuliah 2:58am Aug 9
ijin bertanya, perihal htaccess
redirect www to non www
saat ini digunakan :
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

tapi ada sedikit kendala (buat saya) :
misal, saya akses : http://domain.com/report
dimana url aslinya itu adalah : http://domain.com/index.php?halaman=report

ketika di test dengan : http://www.domain.com/report
url berubah menjadi : http://domain.report/index.php?halaman=report

nah pertanyaannya, supaya perubahan www ke non www tetap ke http://domain.com/report gimana ya ?

udah coba rule lain :
RewriteCond %{HTTP_HOST} ^www\.domain\.com [NC]
RewriteRule (.*) http://domain.com/$1 [R=301,L]

tetep kembalinya ke http://domain.com/index.php?halaman=report

Thanks

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar