Search Results

Search found 446 results on 18 pages for 'ico'.

Page 4/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Why does this mod_rewrite rule 'not-match'? (big rewrite log included)

    - by Christopher
    I've got a scenario involving two domains: WordPress site hosted on domain1.com domain2.co.uk, simply redirecting users to domain1 via mod_rewrite This rule applies irrespective of whether www. is specified or not. (It's eventually removed from the URL, I'm a no-WWW fan.) There's nothing on domain2.co.uk at all except for an .htaccess with some mod_rewrite rules. However, I want to be able to allow users to be redirected to the correct article URI even if they specify the "wrong" URL (i.e., a 301 redirect preserving the stuff after the first forward slash). I'm currently achieving this with this ruleset: RewriteCond %{HTTP_HOST} ^((www\.)?[^\.]+)\.domain2\.co\.uk [NC,OR] RewriteCond %{HTTP_HOST} ^domain2\.co\.uk [NC] RewriteRule ^(.*)$ http://domain1.com/$1 [R=301,L] This works but is uglier than I want it to be. I'm not a mod_rewrite zen master, but from what I can tell the top rule should match irrespective of whether www. is specified... But it doesn't. In order to catch www-less requests, I need the second RewriteCond. From the rewrite log, with just the first RewriteCond: [domain2.co.uk/sid#e200498][rid#e670168/initial] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] strip per-dir prefix: /home/devnull/domains/domain2.co.uk/public_html/ -> [domain2.co.uk/sid#e200498][rid#e670168/initial] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] applying pattern '^(.*)$' to uri '' [domain2.co.uk/sid#e200498][rid#e670168/initial] (4) [perdir /home/devnull/domains/domain2.co.uk/public_html/] RewriteCond: input='domain2.co.uk' pattern='^((www\.)|[^\.]+)\.domain2\.co\.uk' [NC] => not-matched [domain2.co.uk/sid#e200498][rid#e670168/initial] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/ [domain2.co.uk/sid#e200498][rid#e653868/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.html [domain2.co.uk/sid#e200498][rid#e65f8b8/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.htm [domain2.co.uk/sid#e200498][rid#e653868/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.shtml [domain2.co.uk/sid#e200498][rid#e65f8b8/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.php [domain2.co.uk/sid#e200498][rid#e653868/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.php5 [domain2.co.uk/sid#e200498][rid#e666c98/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.php4 [domain2.co.uk/sid#e200498][rid#e65f8b8/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.php3 [domain2.co.uk/sid#e200498][rid#e653868/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.phtml [domain2.co.uk/sid#e200498][rid#e65f8b8/subreq] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/index.cgi [domain2.co.uk/sid#e200498][rid#e66c370/initial/redir#1] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] strip per-dir prefix: /home/devnull/domains/domain2.co.uk/public_html/403.shtml -> 403.shtml [domain2.co.uk/sid#e200498][rid#e66c370/initial/redir#1] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] applying pattern '^(.*)$' to uri '403.shtml' [domain2.co.uk/sid#e200498][rid#e66c370/initial/redir#1] (4) [perdir /home/devnull/domains/domain2.co.uk/public_html/] RewriteCond: input='domain2.co.uk' pattern='^((www\.)|[^\.]+)\.domain2\.co\.uk' [NC] => not-matched [domain2.co.uk/sid#e200498][rid#e66c370/initial/redir#1] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/403.shtml [domain2.co.uk/sid#e200498][rid#e668ca8/initial] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] strip per-dir prefix: /home/devnull/domains/domain2.co.uk/public_html/favicon.ico -> favicon.ico [domain2.co.uk/sid#e200498][rid#e668ca8/initial] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] applying pattern '^(.*)$' to uri 'favicon.ico' [domain2.co.uk/sid#e200498][rid#e668ca8/initial] (4) [perdir /home/devnull/domains/domain2.co.uk/public_html/] RewriteCond: input='domain2.co.uk' pattern='^((www\.)|[^\.]+)\.domain2\.co\.uk' [NC] => not-matched [domain2.co.uk/sid#e200498][rid#e668ca8/initial] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/favicon.ico [domain2.co.uk/sid#e200498][rid#f160b40/initial/redir#1] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] strip per-dir prefix: /home/devnull/domains/domain2.co.uk/public_html/404.shtml -> 404.shtml [domain2.co.uk/sid#e200498][rid#f160b40/initial/redir#1] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] applying pattern '^(.*)$' to uri '404.shtml' [domain2.co.uk/sid#e200498][rid#f160b40/initial/redir#1] (4) [perdir /home/devnull/domains/domain2.co.uk/public_html/] RewriteCond: input='domain2.co.uk' pattern='^((www\.)|[^\.]+)\.domain2\.co\.uk' [NC] => not-matched [domain2.co.uk/sid#e200498][rid#f160b40/initial/redir#1] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] pass through /home/devnull/domains/domain2.co.uk/public_html/404.shtml However with the second RewriteCond added, the rule works, and the logs show this: [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] strip per-dir prefix: /home/devnull/domains/domain2.co.uk/public_html/ -> [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (3) [perdir /home/devnull/domains/domain2.co.uk/public_html/] applying pattern '^(.*)$' to uri '' [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (4) [perdir /home/devnull/domains/domain2.co.uk/public_html/] RewriteCond: input='domain2.co.uk' pattern='^((www\.)?[^\.]+)\.domain2\.co\.uk' [NC] => not-matched [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (4) [perdir /home/devnull/domains/domain2.co.uk/public_html/] RewriteCond: input='domain2.co.uk' pattern='^domain2\.co\.uk' [NC] => matched [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (2) [perdir /home/devnull/domains/domain2.co.uk/public_html/] rewrite '' -> 'http://domain1.com/' [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (2) [perdir /home/devnull/domains/domain2.co.uk/public_html/] explicitly forcing redirect with http://domain1.com/ [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] escaping http://domain1.com/ for redirect [domain2.co.uk/sid#e200498][rid#e65fe58/initial] (1) [perdir /home/devnull/domains/domain2.co.uk/public_html/] redirect to http://domain1.com/ [REDIRECT/301] Can anybody help me figure out why it just won't work with the one rule? I feel like I'm missing the bleeding obvious, and while the second RewriteCond is a valid workaround, it's a kludge and that annoys me. ;-) All help appreciated...

    Read the article

  • django url matching with Lighttpd fastcgi

    - by 7seb
    I have a problem with url. I can access the djando app home page ( localhost/djangotest/ ) but can't access the admin section ( localhost/djangotest/admin/ ). I can access it using the django server instead of lighttpd. Lighttp conf : fastcgi.server = ( "/djangotest/" => ( "main" => ( "host" => "127.0.0.1", "port" => 3033, "check-local" => "disable", ) ), ) url.rewrite-once = ( "^(/media.*)$" => "$1", "^/favicon\.ico$" => "/media/favicon.ico", "^/djangotest/[^?](.*)$" => "/djangotest/?$1", ) The django url.py is just : (i just uncommented the good lines) : from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), ) I tried many things but without success ... (no need to link to https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/ ) lighttpd/1.4.28 Python 2.7.2+ Django 1.3.0

    Read the article

  • convert .htaccess to nginx

    - by Chip Gà Con
    It's me again :( I was trying to install siwapp on my webserver but I couldn't make it work with nginx, here is the .htaccess file content: RewriteCond %{REQUEST_FILENAME} !index.php RewriteRule (.*)\.php$ index.php/$1 RewriteCond $1 !^(index\.php|nhototamsu|assets|cache|xd_receiver\.html|photo|ipanel|automap|xajax_js|files|robots\.txt|favicon\.ico|ione\.ico|(.*)\.xml|ror\.xml|tool|google6afb981101589049\.html|googlec0d38cf2adbc25bc\.html|widget|iradio_admin|services|wsdl) RewriteRule ^(.*)$ index.php/$1 [QSA,L] When I access http://myurl.com/tin-tuc/tuyen-sinh/tu-van/2012/04/25757-phan-van-qua-giua-khoi-a1-va-khoi-a.html ,nginx could display the page correctly, it said: "404 Not Found" (new URL: http://myurl.com/tin-tuc/tuyen-sinh/tu-van/2012/04/25757-phan-van-qua-giua-khoi-a1-va-khoi-a.html)

    Read the article

  • Extract High Quality Icons from Files Using a Free Tool

    - by Lori Kaufman
    If you need to extract an icon from a program file or other type of file (such as .dll files), there are many free tools available that make the task easy. However, very few will extract high quality icon images from the files. Most free icon extraction tools will extract smaller icon image sizes, such as 16×16, 32×32, or 48×48 pixels. Some icons come in larger sizes, such as icons used in Windows. There is a free, small utility, called BeCyIconGrabber, that allows you to view and save icons and cursors of any size contained in .exe, .dll, .icl, .ocx, .cpl, .src, .ico, and .cur files. You can save the extracted icons individually as a .png file, .bmp file, .ico file, or .cur file, or in groups within resource libraries, i.e., .dll or .icl files. BeCyIconGrabber can be downloaded as an installable file or as a portable executable that does not need to be installed. We downloaded the portable file. How To Properly Scan a Photograph (And Get An Even Better Image) The HTG Guide to Hiding Your Data in a TrueCrypt Hidden Volume Make Your Own Windows 8 Start Button with Zero Memory Usage

    Read the article

  • 310 too many redirects after moving drupal site to fast-cgi

    - by Jaels
    Here is trouble: When i follow this link - http://znak.net.ua it rewrites to http://znak.net.ua/ru/ru/ru/ru/ru/ and i got Error 310 (net::ERR_TOO_MANY_REDIRECTS) This happend when i start using fast-cgi insteed of mod_php Here is my .htaccess: ErrorDocument 404 "The requested file favicon.ico was not found. DirectoryIndex index.php <IfModule mod_php4.c> </IfModule> <IfModule sapi_apache2.c> </IfModule> <IfModule mod_php5.c> </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresDefault A1209600 ExpiresByType text/html A1 </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(.*)$ http://znak.net.ua/ru/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ ru/index.php?q=$1 [L,QSA] </IfModule>

    Read the article

  • 403 Forbidden

    - by demas
    Here is my Nginx config: user pass users; worker_processes 1; events { worker_connections 1024; } http { passenger_root /usr/lib64/ruby/gems/1.8/gems/passenger-3.0.7; passenger_ruby /usr/bin/ruby; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name some.another.ru; root /www/public/redmine; passenger_enabled on; rails_env development; } } Here is Nginx log: 2011/06/02 12:53:57 [error] 45986#0: *1 directory index of "/www/public/redmine/" is forbidden, client: **.*.**.***, server: some.another.ru, request: "GET / HTTP/1.1", host: "some.another.ru" 2011/06/02 12:53:59 [error] 45986#0: *1 open() "/www/public/redmine/favicon.ico" failed (2: No such file or directory), client: **.*.**.***, server: some.another.ru, request: "GET /favicon.ico HTTP/1.1", host: "some.another.ru" What is the reason of this error and how can I fix it?

    Read the article

  • MediaTemple Django Bad Gateway

    - by Eeyore
    I have a site running on GS server on MediaTemple. It's Django/PostgreSQL setup. For some reason from time to time I get Bad Gateway error and I can't figure out what's causing it. What can cause this error? What else can I do to find the cause of the problem? url.access-deny = ( "~", ".inc" ) fastcgi.server = ( "/main.fcgi" => ( "main" => ( "socket" => "/var/tmp/" + appname + ".sock", # don't change this "check-local" => "disable", ) ) ) alias.url = ( "/media/" => "/home/xxx/data/python/django/django/contrib/admin/media/", "/static/" => "/home/xxx/containers/django/site/static/", ) url.rewrite-once = ( "^(/media.*)$" => "$1", "^(/static.*)$" => "$1", "^/favicon\.ico$" => "/media/favicon.ico", "^(/.*)$" => "/main.fcgi$1", ) server.error-handler-404 = "/main.fcgi"

    Read the article

  • client denied by server configuration , Options ExecCGI is off in this directory

    - by John Smiith
    Error log [Wed Jul 04 06:01:54 2012] [error] [client 127.0.0.1] File does not exist: C:/xampp/www/htdocs/localhost/favicon.ico [Wed Jul 04 06:01:54 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/Bin/apache [Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] Options ExecCGI is off in this directory: C:/xampp/www/htdocs/wsgi_app/wsgi_handler.py [Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/Bin/apache [Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] File does not exist: C:/xampp/www/htdocs/localhost/favicon.ico [Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/Bin/apache Virtual host <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/xampp/www/htdocs/localhost" ServerName localhost ServerAlias www.localhost ErrorLog "logs/localhost-error.log" CustomLog "logs/localhost-access.log" combined </VirtualHost> mod_wsgi httpdconf WSGIScriptAlias /wsgi "C:/xampp/www/htdocs/wsgi_app/wsgi_handler.py" <Directory "C:/xampp/www/htdocs/wsgi_app/"> AllowOverride None Options None Order deny,allow Allow from all </Directory> http://localhost/wsgi giving 403 error

    Read the article

  • Nginx, proxy passing to Apache, and SSL

    - by Vic
    I have Nginx and Apache set up with Nginx proxy-passing everything to Apache except static resources. I have a server set up for port 80 like so: server { listen 80; server_name *.example1.com *.example2.com; [...] location ~* \.(?:ico|css|js|gif|jpe?g|png|pdf|te?xt)$ { access_log off; expires max; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; add_header Vary: Accept-Encoding; } location / { proxy_pass http://127.0.0.1:8080; include /etc/nginx/conf.d/proxy.conf; } } And since we have multiple ssl sites (with different ssl certificates) I have a server{} block for each of them like so: server { listen 443 ssl; server_name *.example1.com; [...] location ~* \.(?:ico|css|js|gif|jpe?g|png|pdf|te?xt)$ { access_log off; expires max; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; add_header Vary: Accept-Encoding; } location / { proxy_pass https://127.0.0.1:8443; include /etc/nginx/conf.d/proxy.conf; proxy_set_header X-Forwarded-Port 443; proxy_set_header X-Forwarded-Proto https; } } server { listen 443 ssl; server_name *.example2.com; [...] location ~* \.(?:ico|css|js|gif|jpe?g|png|pdf|te?xt)$ { access_log off; expires max; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; add_header Vary: Accept-Encoding; } location / { proxy_pass https://127.0.0.1:8445; include /etc/nginx/conf.d/proxy.conf; proxy_set_header X-Forwarded-Port 443; proxy_set_header X-Forwarded-Proto https; } } First of all, I think there is a very obvious problem here, which is that I'm double-encrypting everything, first at the nginx level and then again by Apache. To make everything worse, I just started using Amazon's Elastic Load Balancer, so I added the certificate to the ELB and now SSL encryption is happening three times. That's gotta be horrible for performance. What is the sane way to handle this? Should I be forwarding https on the ELB - http on nginx - http on apache? Secondly, there is so much duplication above. Is the best method to not repeat myself to put all of the static asset handling in an include file and just include it in the server?

    Read the article

  • Slash-started resources redirection in HTML with .htaccess

    - by Pawka
    I have moved old version of webpage to some subdirectory: http://www.smth.com/old/. But all resources (images, css, etc.) in HTML are linked with slash symbol at the start. So browser still tries to load them from root path. For example old/test.html contains: <img src="/images/lma_logo.ico" /> <!-- not working !--> <img src="images/lma_logo.ico" /> <!-- working !--> How can I rewrite ulrs to load resources from the "old" dir if urls still starts with "/"?

    Read the article

  • Setting up apache rewrite rule to only forward if in a directory

    - by wooowoopo
    Hi, I currently have a site setup with the following in httpd.conf: <VirtualHost x.x.x.x:80> ServerName testsite ExpiresActive On ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType text/css A2592000 ExpiresByType application/x-javascript A1 ExpiresByType text/javascript A1 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript DocumentRoot /usr/local/www/apache22/data/thesite/trunk RewriteEngine On RewriteRule !\.(htc|js|tiff|gif|css|jpg|png|swf|ico|jar|html|doc|pdf|htm|xml)$ %{DOCUMENT_ROOT}/../platform.php [L] </VirtualHost> Where x.x.x.x is my IP. At the moment it forwards anything which is not in the set (htc|js|tiff|gif|css|jpg|png|swf|ico|jar|html|doc|pdf|htm|xml) to platform.php How htp://x.x.x.x/phpmyadmin to also forward. Would it be possible to only perform this rewrite conidtion if I am in a subdirectory. Eg. http://x.x.x.x/projectone So htp://x.x.x.x/projectone/login would direct to the platform.php Thanks

    Read the article

  • URL shortcut on the desktop doesn't show icon on Windows 7

    - by led
    I added a new shortcut.url file with the following: [InternetShortcut] URL=http://test.com/ IDList= HotKey=0 IconFile=C:\Program Files\Test\logo.ico IconIndex=0 This works on XP - the shortcut displays the logo.ico. But on Windows 7, the shortcut is white, without the icon. The icon exists in the location on Windows 7. I also noticed that if I use the Windows GUI to set the icon it works. Even though I am setting it to the same icon. Is there a setting (maybe) where you have to include a path for the icon to work? How can I get it to work on Windows 7?

    Read the article

  • Resources started with slash .htaccess redirection

    - by Pawka
    I have moved old version of webpage to some subdirectory: http://www.smth.com/old/. But all resources (images, css, etc.) in HTML are linked with slash symbol at the start. So browser still tries to load them from root path. For example old/test.html contains: <img src="/images/lma_logo.ico" /> <!-- not working !--> <img src="images/lma_logo.ico" /> <!-- working !--> How can I rewrite ulrs to load resources from the "old" dir if urls still starts with "/"?

    Read the article

  • Per-user vhost logging

    - by kojiro
    I have a working per-user virtual host configuration with Apache, but I would like each user to have access to the logs for his virtual hosts. Obviously the ErrorLog and CustomLog directives don't accept the wildcard syntax that VirtualDocumentRoot does, but is there a way to achieve logs in each user's directory? <VirtualHost *:80> ServerName *.example.com ServerAdmin [email protected] VirtualDocumentRoot /home/%2/projects/%1 <Directory /home/*/projects/> Options FollowSymlinks Indexes IndexOptions FancyIndexing FoldersFirst AllowOverride All Order Allow,Deny Allow From All Satisfy Any </Directory> Alias /favicon.ico /var/www/default/favicon.ico Alias /robots.txt /var/www/default/robots.txt LogLevel warn # ErrorLog /home/%2/logs/%1.error.log # CustomLog /home/%2/logs/%1.access.log combined </VirtualHost>

    Read the article

  • Why is my PHP query executing twice on page load?

    - by user1826238
    I am newish to PHP and I seem to be having an issue with an insert statement that executes twice when I open this page to view a document. In the database the 2nd insert is 1 second later. It happens in google chrome only and on this page only. IE has no issue, I dont have firefox to check. view_document.php <?php require_once($_SERVER['DOCUMENT_ROOT'] . '/../includes/core.php'); require_once($_SERVER['DOCUMENT_ROOT'] . '/../includes/connect.php'); $webusername = $_SESSION['webname']; if (isset($_GET['document'])) { $ainumber = (int) $_GET['document']; if (!ctype_digit($_GET['document']) || !preg_match('~^[0-9]+$~',$_GET['document']) || !is_numeric($_GET['document'])) { $_SESSION = array(); session_destroy(); header('Location: login.php'); } else { $stmt = $connect->prepare("SELECT s_filename, s_reference FROM dmsmain WHERE s_ainumber = ?") or die(mysqli_error()); $stmt->bind_param('s', $ainumber); $stmt->execute(); $stmt->bind_result($filename, $reference); $stmt->fetch(); $stmt->close(); $file = $_SERVER['DOCUMENT_ROOT'] . '/../dms/files/'.$filename.'.pdf'; if (file_exists($file)) { header('Content-Type: application/pdf'); header('Content-Disposition: inline; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . filesize($file)); header('Accept-Ranges: bytes'); readfile($file); $stmt = $connect->prepare("INSERT INTO dmslog (s_reference, s_userid, s_lastactivity, s_actiontype) VALUES (?, ?, ?, ?)") or die(mysqli_error()); date_default_timezone_set('Africa/Johannesburg'); $date = date('Y-m-d H:i:s'); $actiontype = 'DL'; $stmt->bind_param('ssss', $reference, $webusername, $date, $actiontype); $stmt->execute(); $stmt->close(); } else { $missing = "<b>File not found</b>"; } } } ?> My HTTP access records I assume [15/Nov/2012:10:14:32 +0200] "POST /dms/search.php HTTP/1.1" 200 5783 "http://www.denso.co.za/dms/search.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" [15/Nov/2012:10:14:33 +0200] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" [15/Nov/2012:10:14:34 +0200] "GET /dms/view_document.php?document=8 HTTP/1.1" 200 2965 "http://www.denso.co.za/dms/search.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" [15/Nov/2012:10:14:35 +0200] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" I have checked my <img src=''> links and I dont see a problem with them. The records indictate there is a favicon.ico request so I created a blank favicon and placed it in my public_html folder and linked it in the page like so <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" /> Unfortunately that did not work as the statement still executes twice. I am unsure if it is a favicon issue as my upload page uses an insert query and it executes once. If someone could please tell me where I am going wrong or point me in the right direction I would be very grateful

    Read the article

  • Icon for shortcut

    - by Jacek
    Hi! Could you tell me what is wrong in this code?? Why it doesn't work?? <?xml version="1.0" encoding="utf-8"?> <Icon Id="ikonka" SourceFile="Files\AdministKOB.exe"/> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="DesktopFolder"/> <Directory Id="ProgramMenuFolder"> <!--<Directory Id="MenuStartProduct" Name="Administrator KOB"/>--> </Directory> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLLOCATION" Name="Administ_KOB"> <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. --> <Component Id="ProductComponent" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efa"> <!-- TODO: Insert files, registry keys, and other resources here. --> <File Id="AdministKOB" Name="AdministKOB.exe" Source="Files\AdministKOB.exe" KeyPath="yes"> <Shortcut Advertise="yes" Id="DesktopShortcut" Directory="DesktopFolder" Name="AdministKOB" WorkingDirectory="INSTALLDIR" Description="Elektroniczna ksiazka budynku" Icon ="ikonka"> </Shortcut> </File> <!--<File Id="ikonka" Name="C.ico" DiskId="1" Source="City.ico" Vital="yes" />--> </Component> <Component Id="ProductComponent_cfg" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efb"> <File Id="data.cfg" Name="data.cfg" Source="Files\data.cfg" /> </Component> <Component Id="ProductComponent_dll" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efc"> <File Id="DB.dll" Name="DB.dll" Source="Files\DB.dll" /> </Component> <Directory Id="Data"> <Directory Id="Data_1" Name="Data"> <Component Id="ProductComponent_mdf" DiskId="1" Guid="45B88917-DB08-4C4A-9DE4-D41BCE449BA5"> <File Id="bazaKOB.mdf" Name="bazaKOB.mdf" Source="Files\Data\bazaKOB.mdf" /> </Component> <Component Id="ProductComponent_ldf" DiskId="1" Guid="EFEBF7C5-338C-417C-8F5B-3C3BDE46F8EB"> <File Id="bazaKOB_log.LDF" Name="bazaKOB_log.LDF" Source="Files\Data\bazaKOB_log.LDF" /> </Component> </Directory> </Directory> </Directory> </Directory> </Directory> <Feature Id="ProductFeature" Title="AdministKOB" Level="1"> <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. --> <ComponentRef Id="ProductComponent" /> <ComponentRef Id="ProductComponent_cfg" /> <ComponentRef Id="ProductComponent_dll" /> <ComponentRef Id="ProductComponent_mdf" /> <ComponentRef Id="ProductComponent_ldf" /> </Feature> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> <UIRef Id="WixUI_InstallDir" /> <WixVariable Id="WixUIDialogBmp" Value="background_projectUp.bmp" /> <WixVariable Id="WixUILicenseRtf" Value="license.rtf" /> <UI /> </Product> I get this error and warnings: The extension of Icon 'ikonka' for Shortcut 'DesktopShortcut' is not "exe" or "ico". The Icon will not be displayed correctly. Why?? I give ICO file. The extension of Icon 'ikonka' for Shortcut 'DesktopShortcut' does not match the extension of the Key File for component 'ProductComponent'. Have you any idea?? Thanks for all:) Jacek

    Read the article

  • Varnish default.vcl grace period

    - by Vladimir
    These are my settings for a grace period (/etc/varnish/default.vcl) sub vcl_recv { .... set req.grace = 360000s; ... } sub vcl_fetch { ... set beresp.grace = 360000s; ... } I tested Varnish using localhost and nodejs as a server. I started localhost, the site was up. Then I disconnected server and the site got disconnected in less than 2 min. It says: Error 503 Service Unavailable Service Unavailable Guru Meditation: XID: 1890127100 Varnish cache server Could you tell me what could be the problem? sub vcl_fetch { if (beresp.ttl < 120s) { ##std.log("Adjusting TTL"); set beresp.ttl = 36000s; ##120s; } # Do not cache the object if the backend application does not want us to. if (beresp.http.Cache-Control ~ "(no-cache|no-store|private|must-revalidate)") { return(hit_for_pass); } # Do not cache the object if the status is not in the 200s if (beresp.status >= 300) { # Remove the Set-Cookie header #remove beresp.http.Set-Cookie; return(hit_for_pass); } # # Everything below here should be cached # # Remove the Set-Cookie header ####remove beresp.http.Set-Cookie; # Set the grace time ## set beresp.grace = 1s; //change this to minutes in case of app shutdown set beresp.grace = 360000s; ## 10 hour - reduce if it has negative impact # Static assets - browser caches tpiphem for a long time. if (req.url ~ "\.(css|js|.js|jpg|jpeg|gif|ico|png)\??\d*$") { /* Remove Expires from backend, it's not long enough */ unset beresp.http.expires; /* Set the clients TTL on this object */ set beresp.http.cache-control = "public, max-age=31536000"; /* marker for vcl_deliver to reset Age: */ set beresp.http.magicmarker = "1"; } else { set beresp.http.Cache-Control = "private, max-age=0, must-revalidate"; set beresp.http.Pragma = "no-cache"; } if (req.url ~ "\.(css|js|min|)\??\d*$") { set beresp.do_gzip = true; unset beresp.http.expires; set beresp.http.cache-control = "public, max-age=31536000"; set beresp.http.expires = beresp.ttl; set beresp.http.age = "0"; } ##do not duplicate these settings if (req.url ~ ".css") { set beresp.do_gzip = true; unset beresp.http.expires; set beresp.http.cache-control = "public, max-age=31536000"; set beresp.http.expires = beresp.ttl; set beresp.http.age = "0"; } if (req.url ~ ".js") { set beresp.do_gzip = true; unset beresp.http.expires; set beresp.http.cache-control = "public, max-age=31536000"; set beresp.http.expires = beresp.ttl; set beresp.http.age = "0"; } if (req.url ~ ".min") { set beresp.do_gzip = true; unset beresp.http.expires; set beresp.http.cache-control = "public, max-age=31536000"; set beresp.http.expires = beresp.ttl; set beresp.http.age = "0"; } ## If the request to the backend returns a code other than 200, restart the loop ## If the number of restarts reaches the value of the parameter max_restarts, ## the request will be error'ed. max_restarts defaults to 4. This prevents ## an eternal loop in the event that, e.g., the object does not exist at all. if (beresp.status != 200 && beresp.status != 403 && beresp.status != 404) { return(restart); } if (beresp.status == 302) { return(deliver); } # Never cache posts if (req.url ~ "\/post\/" || req.url ~ "\/submit\/" || req.url ~ "\/ask\/" || req.url ~ "\/add\/") { return(hit_for_pass); } ##check this setting to ensure that it does not cause issues for browsers with no gzip if (beresp.http.content-type ~ "text") { set beresp.do_gzip = true; } if (beresp.http.Set-Cookie) { return(deliver); } ##if (req.url == "/index.html") { set beresp.do_esi = true; ##} ## check if this is needed or should be used # return(deliver); the object return(deliver); } sub vcl_recv { ##avoid leeching of images call hot_link; set req.grace = 360000s; ##2m ## if one backend is down - use another if (req.restarts == 0) { set req.backend = cache_director; ##we can specify individual VMs } else if (req.restarts == 1) { set req.backend = cache_director; } ## post calls should not be cached - add cookie for these requests if using micro-caching # Pass requests that are not GET or HEAD if (req.request != "GET" && req.request != "HEAD") { return(pass); ## return(pass) goes to backend - not cache } # Don't cache the result of a redirect if (req.http.Referer ~ "redir" || req.http.Origin ~ "jumpto") { return(pass); } # Don't cache the result of a redirect (asking for logon) if (req.http.Referer ~ "post" || req.http.Referer ~ "submit" || req.http.Referer ~ "add" || req.http.Referer ~ "ask") { return(pass); } # Never cache posts - ensure that we do not use these strings in our URLs' that need to be cached if (req.url ~ "\/post\/" || req.url ~ "\/submit\/" || req.url ~ "\/ask\/" || req.url ~ "\/add\/") { return(pass); } ## if (req.http.Authorization || req.http.Cookie) { if (req.http.Authorization) { /* Not cacheable by default */ return (pass); } # Handle compression correctly. Different browsers send different # "Accept-Encoding" headers, even though they mostly all support the same # compression mechanisms. By consolidating these compression headers into # a consistent format, we can reduce the size of the cache and get more hits. # @see: http:// varnish.projects.linpro.no/wiki/FAQ/Compression if (req.http.Accept-Encoding) { if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|ico)$") { # No point in compressing these remove req.http.Accept-Encoding; } else if (req.http.Accept-Encoding ~ "gzip") { # If the browser supports it, we'll use gzip. set req.http.Accept-Encoding = "gzip"; } else if (req.http.Accept-Encoding ~ "deflate") { # Next, try deflate if it is supported. set req.http.Accept-Encoding = "deflate"; } else { # Unknown algorithm. Remove it and send unencoded. unset req.http.Accept-Encoding; } } # lookup graphics, css, js & ico files in the cache if (req.url ~ "\.(png|gif|jpg|jpeg|css|.js|ico)$") { return(lookup); } ##added on 0918 - check if it causes issues with user specific content if (req.request == "GET" && req.http.cookie) { return(lookup); } # Pipe requests that are non-RFC2616 or CONNECT which is weird. if (req.request != "GET" && req.request != "HEAD" && req.request != "PUT" && req.request != "POST" && req.request != "TRACE" && req.request != "OPTIONS" && req.request != "DELETE") { ##closing connection and calling pipe return(pipe); } ##purge content via localhost only if (req.request == "PURGE") { if (!client.ip ~ purge) { error 405 "Not allowed."; } return(lookup); } ## do we need this? ## return(lookup); }

    Read the article

  • Another favicon not working in IE...

    - by morktron
    Hi, I've read through and tried all the favicon fixes already posted. Including: Refreshing the cache Using a different favicon that works on other websites Using a favicon generating website Using a Photoshop favicon plugin Using an absolute path Using a relative path It works fine in all the other browsers. I'm using IE8 in Vista via Parallels on a Mac. It's on a Moodle website and I have not altered the default Moodle code for the favicon: <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" /> The site is here: http://www.olvarwood.com.au/olvarwoodonline/ Favicon path is here: http://www.olvarwood.com.au/olvarwoodonline/theme/olvar-wood/favicon.ico Any ideas?

    Read the article

  • Embedding icon in .exe with py2exe, visible in Vista?

    - by WindPower
    Hello, I've been trying to embed an icon (.ico) into my "compyled" .exe with py2exe. Py2Exe does have a way to embed an icon: windows=[{ 'script':'MyScript.py', 'icon_resources':[(1,'MyIcon.ico')] }] And that's what I am using. The icon shows up fine on Windows XP or lower, but doesn't show at all on Vista. I suppose this is because of the new Vista icon format, which can be in PNG format, up to 256x256 pixels. So, how can I get py2exe to embed them into my executable, without breaking the icons on Windows XP? I'm cool with doing it with an external utility rather than py2exe - I've tried this command-line utility to embed it, but it always corrupts my exe and truncates its size for some reason.

    Read the article

  • WPF NotifyIcon Help C#

    - by Sandeep Bansal
    Hi everyone. I'm having trouble with a NotifyIcon in WPF I currently have the following: notifyI = new NotifyIcon(); notifyI.Icon = new Icon("Power.ico"); notifyI.Text = "Shutdown Timer"; notifyI.Visible = true; notifyI.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(notifyI_MouseDoubleClick); The thing is the notifyI.Icon = new Icon("Power.ico") is keep throwing and exception. I can't seem to find a way to use the icon file I have in the resources, can anyone help. Thanks, I am using VS2010 and Blend 3.

    Read the article

  • Drupal Migration Problem

    - by Gok Demir
    After migrating my Drupal (6.16) installation from shared hosting to Linode VPS (Ubunto 10.04 32 bit). Whenever I click a URL it shows only the homepage. I put ?q=user at the end of the URL to login as an admin. When I logged in it is the same. I couldn't navigate to any URL. It shows only homepage. I forgot to clean Drupal cache before migration. Is it because of this? I couldn't navigate to Administer Site configuration Performance to clean cache, nothing works. By the way .htaccess Rewrite on enabled as shown below. apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php-pear php5-xcache php5-suhosin php5-mysql packages are installed. What can I do? # # Apache/PHP/Drupal settings: # # Protect files and directories from prying eyes. <FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$"> Order allow,deny </FilesMatch> # Don't show directory listings for URLs which map to a directory. Options -Indexes # Follow symbolic links in this directory. Options +FollowSymLinks # Make Drupal handle any 404 errors. ErrorDocument 404 /index.php # Force simple error message for requests for non-existent favicon.ico. <Files favicon.ico> # There is no end quote below, for compatibility with Apache 1.3. ErrorDocument 404 "The requested file favicon.ico was not found. </Files> # Set the default handler. DirectoryIndex index.php # Override PHP settings. More in sites/default/settings.php # but the following cannot be changed at runtime. # PHP 4, Apache 1. <IfModule mod_php4.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # PHP 4, Apache 2. <IfModule sapi_apache2.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # PHP 5, Apache 1 and 2. <IfModule mod_php5.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # Requires mod_expires to be enabled. <IfModule mod_expires.c> # Enable expirations. ExpiresActive On # Cache all files for 2 weeks after access (A). ExpiresDefault A1209600 <FilesMatch \.php$> # Do not allow PHP scripts to be cached unless they explicitly send cache # headers themselves. Otherwise all scripts would have to overwrite the # headers set by mod_expires if they want another caching behavior. This may # fail if an error occurs early in the bootstrap process, and it may cause # problems if a non-Drupal PHP file is installed in a subdirectory. ExpiresActive Off </FilesMatch> </IfModule> # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on # If your site can be accessed both with and without the 'www.' prefix, you # can use one of the following settings to redirect users to your preferred # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: # # To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # adapt and uncomment the following: # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] # # To redirect all users to access the site WITHOUT the 'www.' prefix, # (http://www.example.com/... will be redirected to http://example.com/...) # uncomment and adapt the following: # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] # Modify the RewriteBase if you are using Drupal in a subdirectory or in a # VirtualDocumentRoot and the rewrite rules are not working properly. # For example if your site is at http://example.com/drupal uncomment and # modify the following line: # RewriteBase /drupal # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: # RewriteBase / # Rewrite URLs of the form 'x' to the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </IfModule>

    Read the article

  • Can't resolve "UnauthorizedAccessException" with MVC 2 application running under IIS7

    - by Daniel Crenna
    We use MVC controllers that access System.File.IO in our application and they work fine in localhost (IIS 6.0-based Cassini). Deploying to IIS7, we have problems getting the controllers to work because they throw UnauthorizedAccessExceptions. We have done the following to try to resolve the issue: - Set NETWORK SERVICE and IUSR accounts to have permission on the files and folders in question - Ensured the App Pool is running under NETWORK SERVICE and loading the user profile - Application is running under full trust - We tried adding impersonation to web.config and giving NETWORK SERVICE write permissions Now, we alternate between getting UnauthorizedAccessException and an IIS7 404 page that suggests the routes are being ignored completely (for example we serve "/favicon.ico" via a controller when the physical file actually lives at /content/images/favicon.ico). We used ProcessMonitor to try to track down the issue but weren't successful.

    Read the article

  • combining two different htaccess methods into one

    - by Patrick
    Im having trouble getting this htaccess to work properly. This is my file as it stands RewriteEngine on RewriteBase / RewriteRule ^sam/$ animals.php [QSA] RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)|(\.swf)|(\.xpi)|(\.ico)|(\.src)$ RewriteCond %{REQUEST_URI} ^(.*)$ RewriteRule (.*)$ get.php?code=$1 [L] When i use RewriteEngine on RewriteBase / RewriteRule ^sam/$ animals.php [QSA] or RewriteEngine on RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)|(\.swf)|(\.xpi)|(\.ico)|(\.src)$ RewriteCond %{REQUEST_URI} ^(.*)$ RewriteRule (.*)$ get.php?code=$1 [L] independently, it works fine, but together neither work properly. Here is what im trying to do: Any requests sent to domain.com/sam/?whatever=dogs, will get sent to domain.com/animals.php?whatever=dogs Any requests sent as domain.com/whatever, will get sent to domain.com/get.php?code=whatever

    Read the article

  • Windows Autorun for an HTML file

    - by maestrojed
    I have a html file on a flash drive that I would like to autorun in Windows. I have found examples of multiple ways to do this but none of them are working for me. Anyone see what I am doing wrong? This is my latest Attempt: [autorun] icon=data/favicon.ico label=My Project open=ShellRun.exe OPEN-ME.htm This was another attempt: [autorun] icon=data/favicon.ico label=My Project shellexecute=OPEN-ME.html shell\openme=Learn More About My Project shell\openme\command=OPEN-ME.html shell=openme Some of this is working, like the icon and the label. Just not the auto run.

    Read the article

  • Icons in Windows Form Applications (VS2008)

    - by typoknig
    This is yet another question about .ico files. I have read through many pages trying to figure this out but I am unable to. When I go to Properties - Application of my Windows Form Application there is a place for me to pick the icon for my application. I have made a 32x32 icon and it takes it just fine, but the image is grainy when it is applied to my .exe file, like it is a picture that has been expanded more than it should have. 1.) Why is this? 2.) Is there any .ico file size other than 32x32 than a Windows Form Application can accept? I have tried 48x48 but it doesn't like that. I just want my .exe file to look nice!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >