duan111112 2015-01-27 15:02
浏览 43

网址中的破折号是破坏网站

I came across this weird issue. The following url breaks my website by giving 'Forbidden. You don't have permission to access / on this server.' error: http://www.example.com/q?=11223-222-323dd-3232-dd44

However if I remove one dash http://www.example.com/q?=11223-222-323dd-3232 It works! Basically four dashes in url breaks the website where three is still OK. What could possibly be causing this??

This is how my .htaccess looks like

RewriteEngine on

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 1
php_value docref_ext 1
php_value error_reporting 1
#php_value error_reporting 1
php_flag  log_errors on
#php_value error_log  /var/logs/php_error_logs/casino_live.log
php_flag magic_quotes_gpc off

php_value register_globals          0
php_value session.auto_start        0
php_value session.cookie_lifetime       604800
php_value session.gc_maxlifetime        604800
php_value session.cache_expire      200000

php_value session.use_only_cookies 1
php_value session.use_trans_sid 0

RewriteCond %{QUERY_STRING} ^PHPSESSID=.*$
RewriteRule ^(.*)$ %{REQUEST_URI}? [L,R=301]



AddType text/x-component .htc
RewriteRule ^robots.txt robots.php

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1  !/example.com/(.*)$
RewriteCond $1  !^/index.php/ [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1  ^/example.com/(.*)$
RewriteCond $1  !^/example.com/index.php/ [NC]
RewriteRule ^(.*)$ /example.com/index.php/$1 [L]


RewriteCond %{HTTP_HOST} ^www.example.com|example.com$ 
RewriteRule ^lobby/(.*)$ http://www.example.com/lobby/$1 [R=301]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
    • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
    • ¥50 需求一个up主付费课程
    • ¥20 模型在y分布之外的数据上预测能力不好如何解决