apache

Further question on segmenting AJAX responses

This question is related to one I asked previously, see here. As a way to implement segmented ajax responses, I created a code which does this: The client first calls the script which initializes the process. On the server side, the startScript.cgi code starts generating data, and as it does this, it groups the responses into chunks, a...

How to preserve the Content-Type header of a Tomcat HTTP response sent through an AJP connector to Apache using mod_proxy

I'm having a problem with an incorrect HTTP Response Content-Type header while accessing an Axis2 web service hosted in Tomcat behind Apache through an AJP/1.3 connector. I can access the web service without problems in the browser through its RESTful interface and I can see the results but somehow Apache is changing the response Conten...

Map a second domain to a folder in existing domain with mod_rewrite

I have a jsp application setup with apache/tomcat. My main application is like www.foo.com/main/index.jsp . The content of my main applications is provided by many users. For these users I want to create mini-sites, each containing just the profile of the user and the content he has provided (so it's just a couple of jsp pages for each u...

Display ellipsis before and after fragment in SOLR

I have SOLR configured to return fragments with a fragsize of 500. Sometimes, the whole field is 500 characters or less, so the fragment is identical to the field. For fields that are longer than that, SOLR just returns the fragment without any indication (or so it seems) that the fragment only represents part of the content of a field...

Using mod_rewrite to serve mobile version of a page

I'm trying to add an optional mobile layout to an existing website. Under certain circumstances, I'd like to be able to serve entirely different content for the mobile version than for the same page on the regular version. If the user visits, say, m.example.com/food/apple.html, he'll see an entirely different page than for example.com/...

.htaccess rule for rewriting a GET URL

Hello, On a website I have a search form with method get. I would like to know if I can rewrite that url to a better looking one. For example, now after I submit the search form I get an url like this: http://www.mywebsite.com/search.php?search_category=0&search_term=Jackson&submit_search= It would be great if I could ma...

Stop mp3 file from streaming in browsers.

I have an mp3 on an apache server. I want it to be downloaded as a file when a user visits the link. Instead quicktime, or google chromes media player will try and stream it. Is there a fix for this with headers? Or is the only option so 'right click save as'? Edit Here is my header. Safari has stopped streaming, but chrome contines to...

Apache Log analys tools with good reporting of Phone Platform etc.

I'm looking for an alternative to Google Analytics as I have a need to see IP address data. I'd prefer be using an open source package hosted on my own linux servers. Historically, I have used Analog for this purpose, but I'd love to hear what others are doing. The main requirements are: (a) access broken down by site and hours (b) ...

Apache Virtual Host URL

I made an Apache virtual host for a web application that works fine, but I have a problem with the URL. I want my application to be accessed only using an url similar with: http://ip_address/app_name, but now the aplication can be access also with http://ip_address/. My virtual host looks like this: NameVirtualHost 192.168.5.235:80 <V...

How to make html request without full page reload and without ajax

I saw that facebook is doing that. if you look in the chrome inspector they keep on adding "html documents elements" when you navigate on diferent pages. I also noticed that google dose this also. My intention is to make my PHP+DOM load faster under 200 ms from website backed. It's some web server thing? I'm using php with apache. T...

problem using WSGIApplicationGroup %{GLOBAL} in apache configuration

hi all im using django with apache and mod_wsgi i am facing a problem when i use WSGIApplicationGroup %{GLOBAL} in apache configuration file (.conf) . i dont know if i am using this directive correctly or i need to use it in another way , the problem is that i needed to add this directive to fix a problem for xapian as described in thi...

Rewrite rule for apache htaccess that checks for existence of certain GET params

Hi, I just can't find a solution to this... I have several dynamic page links that look like http://DOMAIN/PAGENAME?&amp;param=a/param2=b&amp;tx_ttnews[tt_news]=114&amp;param3=c No I want to have a rewrite for certain "tx_ttnews[tt_news]" values, i.e. if it exists (or certain other numbers) I want to redirect to a completly different ...

Htaccess 301 only part of the redirect works

Hi Im moving a site from one domain to another, and I have created the following .htaccess file, but its not working. *#Options +FollowSymlinks RewriteEngine On redirect 301 http://www.el-netshop.dk/pi/Dækkape_UG150_12_lysegrå_5302_.aspx http://www.el-netsalg.dk/pi/Dækkape_UG150_12_lysegrå_5271_.aspx RewriteCond %{HTTP_HOST} ^el-netsho...

Add Expire headers to ASP.NET?

Programmatically how do i add expire header? I am not using IIS, i'd like to do this in ASP.NET itself or maybe how to do it with apache which is what i am using. ...

How to Detect and Redirect from URL with Anchor Using mod_rewrite/htaccess?

I've seen a number of examples of the opposite, but I'm looking to go from an anchor/hash URL to a non-anchor URL, like so: From: http://old.swfaddress-site.com/#/page/name To: http://new.html-site.com/page/name None of the examples at http://karoshiethos.com/2008/07/25/handling-urlencoded-swfaddress-links-with-mod_rewrite/ have fun...

How do I prevent direct access/download to mp3/wav files while allowing a flash player to access them with .htaccess (or PHP)

I've been scouring the Net for hours looking for a solution with with only partial and non-functioning solutions to show for my efforts. The solution below seemed like a great fix at first but it also blocks my flash player from accessing the files. Could I only allow access from particular pages?: < Files ~ "..."> order allow,deny den...

Apache: Permanent redirect that is case-insensitive?

i have the following redirect: RedirectPermanent /SCJ https://fin-iq.com but it does not work for /scj, /sCj, etc. is there a way to make this case insensitive? i tried adding [NC,L] but the page crashed. thanks! ...

Why does httpd -l give me a different list of modules based on what directory I put it in?

Hi, I compiled my own apache 2.2.15 with "--enable-autoindex". When I run httpd -l on the resulting binary, mod_autoindex.c comes up in the list. When I move the binary to /usr/local/apache_front/bin and do httpd -l on it, it lists every module except mod_autoindex.c . I am getting errors when using mod_autoindex-specific directives,...

How do I create a regular expression to negate a string but include anything else.

I'm trying to create a regex for apache that will ignore certain strings, but will use anything else. Ive tried many different methods however i just can't seem to get it correct. for example i want it to ignore ignore.mysite.com but anything else i want it to use *.mysite.com ...

Apache Config for High Page View, Long Session Users - KeepAlive and MaxRequest variables

Hi all, I am currently running a web app that sees several (~15) users logging in once each day, and then leaving the web app open where it automatically refreshes with new content every 5 minutes. Each user tends to have it open for about 15-18 hours. However at critical mass (~30-40) users everything starts to slow down dramatically ...