apache

How to write a mod_rewrite rule to look for an image in a specific folder?

I need to write a rule to redirect any image file to a specific folder. Namely "images" RewriteCond $1 ^(.*\.jpg|.*\.gif|.*\.bmp) That will match all the imag, the the rerwrite part is confusing me. I want that Http://domain.com/path/controller/view/image.jpg http://domain.com/any/path/that/i/want/image.jpg to load the file http:...

UTF-8 URI explodes Apache & mod_rewrite

I have Apache with mod_rewrite, and whenever I enter a URI with an accented character in it, Apache gives me a "Page Not Found" error. The URI is: /places/tags/Café My page encoding is UTF-8. My database connection & tables are UTF-8. My Apache DefaultCharacterSet = UTF-8. Yes, Apache has language packs, but I believe they're there for...

Can I tell Apache to do an internal redirect from PHP?

Is there any way, from a PHP script called from mod_php with apache, to tell apache to do an INTERNAL redirect to some other file? I do not want to read/require this file from PHP and spit it out, I think it'd be more efficient to pass this off to Apache. I believe this can be done with mod_perl and I'm curious if there's a way to do i...

Locate the path of an Apache server on windows.

For a windows script I am writing, I need to detect if the machine has Apache 2.2 installed, and to find the application path. One solution I came up with is to wget http://localhost:8080/server-info and parse the root and the config file from it. This would fail if the server does not use port 8080 Another option would be to call “s...

Should I put html and java files in the same package (folder) in Apache Wicket ?

I wonder if there is an example which html files and java files are resides in different folders. ...

config_vars.mk missing in default xampp-linux installation.

I extracted the xampp package xampp-linux-1.6.7 on a Ubuntu 8.10 system and followed the instuctions from mod_wsgi documentation. I get the error below: ravi@Ibex:~/mod_wsgi-2.3$ ./configure --with-apxs=/opt/lampp/bin/apxs checking Apache version... cannot open /opt/lampp/build/config_vars.mk: No such file or directory at /opt/lampp/b...

How can I setup different SSL-Certificates for vhosts on Apache?

I have a web-server, that serves different domain-names, but has only one IP-address assigned. That works fine with virtual hosts in Apache. Now I want SSL-encrypted connections for the websites. How can I set different SSL-certificates for the different vhosts? Using different IP's for the different hostnames would be an solution - not...

Converting PDF to HTML with Python

How can I convert PDF files to HTML with Python? I was thinking something alone the lines of what Google does (or seems to do) to index PDF files. My final goal is to setup Apache to show the HTML for the PDF files, so anything leading me in that direction would also be appreciated. ...

Importing which library?

Hi all, recently I downloaded this open source project and I am trying to compile it. However, one of the line is giving me an error. "import com.sun.org.apache.xpath.internal.functions.WrongNumberArgsException;" Seems that i am missing a library.... is there a way to know WHICH library do I need? I tried searching on google for com...

UTF-8 all the way through...

I'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL and PHP to do this - is there some standard c...

What are the server requirements for Silverlight 2?

Can a Silverlight 2 enabled web page be managed from an Apache server? (I'm not actually interested in doing this but trying to understand Silverlight 2 a bit more.) Assuming that I have IIS6 and Server 2003 what are the .NET version requirements to host a web site with Silverlight 2? Are .NET 3.0 and 3.5 required on the server? My thin...

Passthrough <filname>.png to <filename>8.png if IE<=6 and <filename>8.png exists

I just found out that by converting PNG32 to PNG8 via Photoshop will fix the PNG transparency bug in IE<=6. So I had this thought that instead of serving PNG32 to all browser, why not serve PNG8 if the client is using IE<=6. I'm not really an expert when it comes to htaccess/httpd directives so I'm here for help. The title is the p...

How do I use HTTP Authentication for a specific URL (not a directory)

I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like this: # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on # Rewrite current-style URLs of the form 'index.php?controller=x&action=y'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME...

Apache reverse proxy set up SSL certificate

We need to set up a secure certificate on an Apache reverse proxy. We've been advised that we need to use a virtual host directive. I've looked these up in the O'Reilly book bit can't find any examples that pick up https specifically. Does anyone have any examples of config snippets to do this? ...

Apache Mod Rewrite (.htaccess)

Given my current .htaccess file, how would I modify it to check for an additional URL path like '/src/pub/' and rewrite it to '/' without affecting the current rewrite? Here's the original .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?route=$1 [L,...

Hidden features of mod_rewrite

There seem to be a decent number of mod_rewrite threads floating around lately with a bit of confusion over how certain aspects of it work. As a result I've compiled a few notes on common functionality, and perhaps a few annoying nuances. What other features / common issues have you run across using mod_rewrite? ...

How to tune Tomcat 5.5 JVM Memory settings without using the configuration program

I need to configure Tomcat memory settings as part of a larger installation, so manually configuring tomcat with the configuration app after the fact is out of the question. I thought I could just throw the JVM memory settings into the JAVA_OPTS environment variable, but I'm testing that with jconsole to see if it works and it... doesn't...

What's the proper format for an apache benchmark postfile?

What's the proper format for an apache benchmark postfile? ...

Using mySql data in ASP.NET application

I am a newcomer to ASP, and would like to experiment with it by writing a website for a club at my school using .net 2008 and the mySql database available from the school's apache server. What is the best way to set this up, since I see a lot of options to connect the web app to SQL Server or Oracle databases, but I'm nervous that it wo...

How can I check which version of apache is installed on a Debian machine?

The subject says it all. is there a command for doing this? ...