apache

Upgrading a site with SEO in mind

I'm managing an established site which is currently in the process of being upgraded (completely replaced anew), but I'm worried that I'll lose all my Google indexing (that is, there will be a lot of pages in Google's index which won't exist in that place any more). The last time I upgraded a (different) site, someone told me I should h...

Does Apache log cancelled downloads?

If a user requests a large file from an Apache web server, but cancels the download before it completes, is this logged by Apache? Can I tell from the log file which responses were not sent fully, and how many bytes were sent? ...

Apache beehive and localizing default pager for DataGrid

I am trying to localize strings created by Apache Beehive and netui default pager. I'd like to translate language of this output. Page 1 of 3 First / Previous Next / Last My .jsp code looks something like this <netui-data:dataGrid name="searchResultsGrid" dataSource="pageInput.someData"> <netui-data:header> ... </net...

How do I redirect URLS that begin with /test/ to a separate script?

I have an existing htaccess that works fine: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule (.*) /default.php DirectoryIndex index.php /default.php I wish to modify this so that all urls that start with /test/ go to /test/default.php. Example: http://www.x.com/hello.php -- > http:/...

Is there a framework for running unit tests on Apache C modules?

Hi, I am about to make some changes to an existing Apache C module to fix some possible security flaws and general bad practices. However the functionality of the code must remain unchanged (except in cases where its fixing a bug). Standard regression testing stuff seems to be in order. I would like to know if anyone knows of a good wa...

MySQL stored procedure vs. multiple selects

Hi all, Here's my scenario: I've got a table of (let's call them) nodes. Primary key on each one is simply "node_id". I've got a table maintaining a hierarchy of nodes, with only two columns: parent_node_id and child_node_id. The hierarchy is maintained in a separate table because nodes can have an N:N relationship. That is to say,...

How would you compare Apache Tomcat & Glassfish as production servers?

I have a J2EE-based system which is running currently on Apache Tomcat. We are in discussions to move our production servers to the Glassfish server. Can someone share their experiences with either of them? ...

What perfromance improvement will I get by moving to lighttpd from Apache?

I currently have a cluster of 4 Apache web servers which are used to serve up static files of up to 30Mb in size. Generally, I can expect up to 5000 concurrent connections to these servers. What performance improvement would I expect to get by moving this to lighttpd? ...

Rewrite rules - going outside the docroot.

Assuming the following directory structure, htdocs/ images/ css/ .htaccess system/ index.php ... I would like to route all incoming requests through that php script. I have been trying some rewrite rules within the htaccess, but I can't seem to be able to route to files that are outside the document root. I couldn't find a r...

Htaccess Two different redirects.

I have an existing htaccess that works fine: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule (.*) /default.php DirectoryIndex index.php /default.php I wish to modify this so that all urls that start with /test/ go to /test/default.php, while keeping all other URLs with the existing /...

RewriteRule redirect

Okay I have this RewriteRule which is supposed to redirect any request for the file base.css to {folder of .htacces file}/include/style/base.css, but is just keeps redirecting in an infinite loop, I thought the L parameter would make sure that wouldn't happen. RewriteRule (.*)/base.css$ include/style/base.css [L,NC,R=301] Also it redi...

URL Rewrite blanket redirect with directory exceptions

I have a website that employs a generic mod_rewrite rule to push all requests to the index.php page, with the exception of certain file extensions: RewriteRule !\.(js|ico|gif|jpg|JPG|png|css|php|phtml|pdf|txt|xml)$ index.php What I need to be able to do is also exclude a certain directory (including any files or sub-directories contai...

How can I get a header that will work with IIS 6, 7 and Apache?

Hello all, I am trying to get a header that will work with Apache, IIS 6, and IIS 7. I won't go into the reason for that here. Let's just say that it's not as easy as I thought it would be :-) Anyway, the problem has something to do with NPH. In our code (originally written for IIS 6) we have use CGI qw(:standard); print "HTTP/1.0...

How to use apache mod_rewrite and alias at the same time?

I have a directory outside the webroot that is used for storing images uploaded from a separate admin system. Images are stored in this format: filepath/writable/images/00/00/23/65/filename-236581.jpg (where the webroot is filepath/html) ...for example. Here, 236 is the ID of the image in the database, and the file system is broken in...

How to timestamp request logs with millisecond accuracy in Apache 2.0

How do I configure Apache 2.0's log format so that it timestamps each request log with millisecond (or microsecond) accuracy? The docs say that timestamps are specified in strftime format and strftime doesn't seem to handle anyting smaller than seconds. ...

Apache2 won't start - Mac OS X - Passenger

I've installed passenger a little while back and when I restarted my mac tonight, Apache2 won't start. Here is what I get. Anyone have any ideas? Re-install Apache2? dyld: Library not loaded: /usr/lib/libaprutil-1.0.dylib Referenced from: /usr/sbin/httpd Reason: no suitable image found. Did find: /usr/lib/libaprutil-1.0.dyli...

Use Apache behind Proxy

I want to run an Apache on my local machine since I can only ssh into my server thru ajaxterm (webbased ssh client) which is a pain in the neck. Now my problem is, that I am running this server and have to send the traffic thru the companies proxy which also has user authentication with password. I have a .pac file so if I can tell Apach...

Configure apache to treat static resources with "?" character in filename

Hello All, For various reasons, I have a bunch of static resources all with the following naming format: xxxxx?yyyyy where the x's are regular letter chars, and the y's numbers 0-9. Apache is truncating the filename in the GET request at the "?" - as this is traditionally used to delinate query params - and thus reporting the follow...

Mod Rewrite rule to Zeus Server rule (Codeigniter)

Hi everyone, I'm about to go live with a Codeigniter powered site. I want to remove index.php from the url so that instead of this: http://www.mysite.com/index.php/controller I get something like this: http://www.mysite.com/controller So far, pretty straightforward. In the past I've used the mod-rewrite rule supplied by the Codeig...

Why does IIS not support chunked transfer encoding?

I am making an HTTP connection to an IIS web server and sending a POST request with the data encoded using Transfer-Encoding: chunked. When I do this, IIS simply closes the connection, with no error message or status code. According to the HTTP 1.1 spec, All HTTP/1.1 applications MUST be able to receive and decode the "chunked" tran...