apache

Apache rewrite rule with parameters?

Hi, I have the following URL: http://domain.com/index.php?m=feedback&cSubject=My Subject I want to have a rewrite rule so that the following: http://domain.com/feedback?Subject=My Subject maps to the previous url. Heres my rule at the moment: RewriteRule ^feedback?Subject=(.*)$ index.php?m=feedback&cSubject=$1 Doesn't seem ...

Using Tomcats(in an apache-tomcat cluster) as reverse-proxies to apache servers behind

I'm writing a small web service(like a content server) to search and serve content. Basically it has 2 parts - one dynamic part performing client authentication and providing search functionality over the content. The second part involves serving static content to the authenticated client. What can be a good architecture for the above s...

Review my .htaccess I can't seem to make it work.

Hi Please review my .htaccess code below. The code below was suggested by I User here (Thanks for the code Gumbo), And I can't seem to make it work. RewriteCond %{THE_REQUEST} ^[A-Z]+\ /myadmin[/\s] [NC] RewriteRule ^myadmin - [NC,L,R=404] RewriteCond %{HTTP_HOST} =myadmin.movietunie.com [NC] RewriteRule !^myadmin/ /home/movietun/pub...

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I'm following Scott Davis' tutorials on developing grails apps, but whenever i try to run my app (or indeed his source code) i get "Firefox has detected that the server is redirecting the request for this address in a way that will never complete." Safari gives a similar error message as does Opera. As i've tested the original authors...

.htaccess rewrite regex: match anything but "index"

Hi guys and gals, I'm trying to create a rule used in a .htaccess file to match anything but a particular string, in this case: index. I thought that it should be possible to match this special string first and use [L] but that's not working, and it should be possible using the following regex, but it causes a 500 error. I want to mat...

How to force the use of SSL for some URL of my Django Application ?

Hello, I want to be sure that for some URL of my website, SSL will be use. I saw a lot of answer already on SO. http://stackoverflow.com/questions/724968/force-redirect-to-ssl-for-all-pages-apart-from-one So I think I will use mod_rewrite. My question is more about how to configure the Virtual Host to run my Django Application over H...

jquery ajax POST size limit?

I’m using jquery to send text back to my ajax.php controller like this: var dataString = "1234567890"; $.post( '../ajax/save', { data: dataString }, function(){ alert("success"); }, "text"); It works well, that is until the dataString gets to be ~3500 characters long. At that upper limit (~3.5 KB), t...

Debugging problems shutting down Apache Tomcat

I have a Tomcat installed as a Windows service, and sometimes it hangs when I try to shut it down (through services.msc). I tried attaching to it with a debugger, but I don't seem to be able to understand why it's hanging. When I try to look at one of the threads by doing "Thread.getThreads()[0]", I get an error from the debugger: "Stac...

mod rewrite setup

I am trying to setup a mod rewrite rule to change urls like: http://www.site.com/play/4435 Into: http://www.site.com/index.php?play=4435 Below is what I have but it is not quite right... RewriteEngine On RewriteRule ^([^/\.]+)/?$ index.php?play=$1 [L] ...

xampp server and java client/server application

hiho, i intend to develop just a litte network application, something like a chat. so i downloaded xampp for windows and installed it (also as service), mysql included. well, i started the apache (and mysql) as service and just wrote the short line in java: try { Socket sock = new Socket("127.0.0.1", 21); System.out.println...

Mod Rewrite problem

.htacces Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^([a-zA-Z0-9_-]+)$ sinj.com.hr/index.php?var1=$1 [L] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ sinj.com.hr/index.php?var1=$1&var2=$2 [L] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ sinj.com.hr/index.php?var1=$1&var2=$2&var3=$3 [L] Re...

Where is extension being set?

I am coding in PHP on Apache, and I have access to two main areas on the Unix server. I have a personal directory and I have a project directory. I noticed that in the project directory there is a extension/module that I have access to automatically which I don't have in my personal directory (I can see it listed in phpinfo()). So I'm g...

IP Blocking URLs on Apache

I need to block access to my entire site via IP Address except the url /api which should be open to all. I am currently using ... <LocationMatch /admin> Order Deny,Allow Deny from all Allow from [MY IP] </LocationMatch> this blocks access urls starting with /admin. But I want to block all urls except the ones that start /...

Can I rewrite from subdomain to folder avoiding redirection?

I want my subdomain to point directly to a folder. That is if an HTTP request is made to apple.example.com, I want the response to be the contents of example.com/apple/index.html, but not a 301 error. Is it possible? ...

Binary diff algorithm for commercial software

I'm working on application sending changed files to other computers. Currently a changed file is sent completely even if the change is minor. I'm looking for a library (C,C++,Java) that would allow me to create a binary diff and send only the delta and the matching patch to merge the data back. I'm looking for something ideally under an...

Different charset on different server?

I've just tested locally my web application, everything works fine, but after uploading to server application behaves differently. I use function formatiraj_string_url to convert diacritic symbols and get clean url... locally it works fine but on server this function doesnt convert them the same way. Few days earlier I tested this on so...

.htaccess problem: No input file specified.

Hello Everyone, Can someone help me with this. I'm feeling like I've been hitting my head against a wall for over 2 hrs now. I've got Apache 2.2.8 + PHP 5.2.6 installed on my machine and the .htacces with code below works fine, no errors. RewriteEngine on RewriteCond $1 !^(index\.php|css|gfx|js|swf|robots\.txt|favicon\.ico) RewriteRul...

When will fcntl in solaris return a value less then -1 for F_SETLKW

Fromt he Mannul of fcntl in solaris, Upon successful completion, value returned for F_SETLKW will be "Value other than -1". But Apache httpd 1.3.41 source code (http_main.c) check if the returned value is positive like: int ret; while ((ret = fcntl(lock_fd, F_SETLKW, &unlock_it)) < 0 && errno == EINTR) { /* nop */ } if (ret < 0) ...

HTTP headers for jpg files after mod_rewrite

Hello, I'm using Apache's mod_rewrite to route requests for .jpg files to a directory outside my web root. It generally has been fine, but there are a few images that do not display. I then realized that when I use PHP's get_headers() function on my image URLs, they are all returning "Content-Type: text/html; charset=UTF-8" instead ...

Apache lags when responding to gzipped requests

For an application I'm developing, the user submits a gzipped HTTP POST request (content-encoding: GZIP) with multipart form data (content-type: multipart/form-data). I use mod_deflate as an input filter to decompress and the web request is processed in Django via mod_wsgi. Generally, everything is fine. But for certain requests (dete...