php - Cannot open localhost -


i have '.htaccess' project cant run on localhost. everytime try open root 'testphp' project folder example:

http:/localhost/training/testphp/

it redirect me to:

localhost/dashboard

as dashboard xampp software. im using xampp run localhost.
here '.htaccess' file

# no web server version , indexes serversignature off options -indexes  # enable rewrite engine rewriteengine on  rewritecond %{server_port} 80  #rewriterule ^(.*)$ https://%{http_host} [r,l]  # block suspicious request methods rewritecond %{request_method} ^(head|trace|delete|track|debug) [nc] rewriterule ^(.*)$ - [f,l]  # block wp timthumb hack rewritecond %{request_uri} (timthumb\.php|phpthumb\.php|thumb\.php|thumbs\.php) [nc] rewriterule . - [s=1]  # block suspicious user agents , requests rewritecond %{http_user_agent} (libwww-perl|wget|python|nikto|curl|scan|java|winhttp|clshttp|loader) [nc,or] rewritecond %{http_user_agent} (<|>|'|%0a|%0d|%27|%3c|%3e|%00) [nc,or] rewritecond %{http_user_agent} (;|<|>|'|"|\)|\(|%0a|%0d|%22|%27|%28|%3c|%3e|%00).*(libwww-perl|wget|python|nikto|curl|scan|java|winhttp|httrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [nc,or] rewritecond %{the_request} \?\ http/ [nc,or] rewritecond %{the_request} \/\*\ http/ [nc,or] rewritecond %{the_request} etc/passwd [nc,or] rewritecond %{the_request} cgi-bin [nc,or] rewritecond %{the_request} (%0a|%0d) [nc,or]  # block mysql injections, rfi, base64, etc. rewritecond %{query_string} [a-za-z0-9_]=http:// [or] rewritecond %{query_string} [a-za-z0-9_]=(\.\.//?)+ [or] rewritecond %{query_string} [a-za-z0-9_]=/([a-z0-9_.]//?)+ [nc,or] rewritecond %{query_string} \=php[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [nc,or] rewritecond %{query_string} (\.\./|\.\.) [or] rewritecond %{query_string} ftp\: [nc,or] rewritecond %{query_string} http\: [nc,or] rewritecond %{query_string} https\: [nc,or] rewritecond %{query_string} \=\|w\| [nc,or] rewritecond %{query_string} ^(.*)/self/(.*)$ [nc,or] rewritecond %{query_string} ^(.*)cpath=http://(.*)$ [nc,or] rewritecond %{query_string} (\<|%3c).*script.*(\>|%3e) [nc,or] rewritecond %{query_string} (<|%3c)([^s]*s)+cript.*(>|%3e) [nc,or] rewritecond %{query_string} (\<|%3c).*iframe.*(\>|%3e) [nc,or] rewritecond %{query_string} (<|%3c)([^i]*i)+frame.*(>|%3e) [nc,or] rewritecond %{query_string} base64_encode.*\(.*\) [nc,or] rewritecond %{query_string} base64_(en|de)code[^(]*\([^)]*\) [nc,or] rewritecond %{query_string} globals(=|\[|\%[0-9a-z]{0,2}) [or] rewritecond %{query_string} _request(=|\[|\%[0-9a-z]{0,2}) [or] rewritecond %{query_string} ^.*(\[|\]|\(|\)|<|>).* [nc,or] rewritecond %{query_string} (null|outfile|load_file) [or] rewritecond %{query_string} (\./|\../|\.../)+(motd|etc|bin) [nc,or] rewritecond %{query_string} (localhost|loopback|127\.0\.0\.1) [nc,or] rewritecond %{query_string} (<|>|'|%0a|%0d|%27|%3c|%3e|%00) [nc,or] rewritecond %{query_string} concat[^\(]*\( [nc,or] rewritecond %{query_string} union([^s]*s)+elect [nc,or] rewritecond %{query_string} union([^a]*a)+ll([^s]*s)+elect [nc,or] rewritecond %{query_string} (;|<|>|'|"|\)|%0a|%0d|%22|%27|%3c|%3e|%00).*(/\*|union|select|insert|drop|delete|update|cast|create|char|convert|alter|declare|order|script|set|md5|benchmark|encode) [nc,or] rewritecond %{query_string} (sp_executesql) [nc] rewriterule ^(.*)$ - [f,l]  # denied hotlink rewritecond %{http_referer} !^$ rewritecond %{http_referer} !^http(s)?://(www\.)?youtube.com [nc] rewriterule .*\.(jpg|jpeg|gif|png|bmp)$ - [f,nc]  ## expires caching - leverage browser caching images, css , js ## <ifmodule mod_expires.c> expiresactive on expiresbytype image/jpg "access 1 year" expiresbytype image/jpeg "access 1 year" expiresbytype image/gif "access 1 year" expiresbytype image/png "access 1 year" expiresbytype text/css "access 1 month" expiresbytype application/pdf "access 1 month" expiresbytype application/x-javascript "access 1 month" expiresbytype application/x-shockwave-flash "access 1 month" expiresbytype image/x-icon "access 1 year" expiresdefault "access 2 days" </ifmodule> ## expires caching ## 


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -