2012-05-25 3 views
0

Может ли кто-нибудь увидеть что-то не так с этим?Что не так с моим .htaccess?

Options +FollowSymlinks 

Options -Indexes 

RewriteEngine On 
RewriteRule ^random-number-generator$ random-number-generator.php [L] 
RewriteRule ^calculator$ calculator.php [L] 
RewriteRule ^currency-converter$ currency-converter.php [L] 
RewriteRule ^youtube-statistics$ youtube-statistics.php [L] 
RewriteRule ^check-website-status$ /check-website-status.php [L] 
RewriteRule ^your-ip-address$ your-ip-address.php [L] 
RewriteRule ^contact-us$ contact-us.php [L] 

RewriteCond %{HTTP_REFERER} !^http://themegahouse.com/.*$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://themegahouse.com$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://www.themegahouse.com/.*$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://www.themegahouse.com$ [NC] 
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://themegahouse.com/restricted [R,NC,L] 

ErrorDocument 401 /not-found.php 
ErrorDocument 403 /restricted.php 
ErrorDocument 404 /not-found.php 

Когда я посещаю корень моего сайта в браузере, я получаю Запретный?

Я уверен, что это этот файл, потому что когда я его удаляю, все работает.

ответ

0

Вам также нужно разрешить пустые ссылки. Помещенный следующее правило правой перед тем другие ваши rewriteconds:

RewriteCond %{HTTP_REFERER} !^$ 
+0

я все еще получаю Запретный? –

+0

Попробуйте еще раз; забыл удалить «[NC]» при копировании и вставке. – ThiefMaster

Смежные вопросы