.htaccess files are not working :(

shan_wicram

Member
Aug 21, 2011
857
84
0
Machan me wada karana code ekak. mama me dan test kara.

Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/dev/new/gtfo.jpg
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?localhost [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ http://localhost:8082/dev/new/gtfo.jpg [NC,R,L]

"http://localhost:8082/dev/new/gtfo.jpg" me part warning image eke URL ekata change karanna.

"/dev/new/gtfo.jpg" kiyana file eka relative to the doc root machan.
---------------------
l5zwPks.png
---------------------------------
Server apache v 2.2.22 (Acquia Dev Desktop), mod_rewrite enabled.

මම ඔය විදිය දැන් ට්‍රයි කරා. ඒත් මචන් වැඩ නෑ.. මම localhost එකට දැම්මේ නම්.. මම හදපු.. vertual host එකක නමක්.. ඒකත් දන්නෑ අවුල. තෑන්ක්ස් මචන් රිප්ලයි එකට. :D:yes:
 

shan_wicram

Member
Aug 21, 2011
857
84
0
උඹ local server එක‌ේ දාලා තියන ඔක්කොම domains test කරන්න නං local server එක‌ේ hosts file එක edit කරලා, ඔය domains තියෙන්නෙ local server එකේ කියන එක set කරන්න ඕන. නැත්තං browser එකෙන් ඒ domains හොයාගෙන net එකට යන්නෙ. local server එකට එන්නෙ නෑ.
host file එකට දාන්නෙ domain name එකට local IP එක. ඕය htaccess කෝඩ් එක නෙමෙයි.

මම මචන් දැනටමත්.. Localhost එකේ Ip එක මගේ vertual host වලට දාල තියෙන්නේ..
Code:
127.0.0.1       localhost
127.0.0.1       bmc-hacking.net
127.0.0.1       ramsad.net
127.0.0.1       dapto.zapto.org
127.0.0.1       lkhacker.zapto.org
127.0.0.1 activation.cloud.techsmith.com
 

kosandpol

Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    මම මචන් දැනටමත්.. Localhost එකේ Ip එක මගේ vertual host වලට දාල තියෙන්නේ..
    Code:
    127.0.0.1       localhost
    127.0.0.1       bmc-hacking.net
    127.0.0.1       ramsad.net
    127.0.0.1       dapto.zapto.org
    127.0.0.1       lkhacker.zapto.org
    127.0.0.1 activation.cloud.techsmith.com
    hmm..
    ඔය හැම virtual host එකකම පොඩි php code එකක් දාලා Referrer මොකක්ද පෙන්නනනෙ කියලා බලන්න. htaccess කෝඩ් එක බලන්නෙ ඒකනෙ,
     

    shan_wicram

    Member
    Aug 21, 2011
    857
    84
    0
    hmm..
    ඔය හැම virtual host එකකම පොඩි php code එකක් දාලා Referrer මොකක්ද පෙන්නනනෙ කියලා බලන්න. htaccess කෝඩ් එක බලන්නෙ ඒකනෙ,

    ඒ කිව්වේ මචන්? පොඩ්ඩක් පැහැදිලි කරන්න පුලුවන්ද? :cool: