apache

internally redirecting to another file in Apache

Hi, I want that a url http://domain.com/sitemap.xml internally points to a file sitemap_book.xml in htdocs without any 301/302 redirects. Please suggest a Rewrite Rule for the same. I came up with RewriteCond %{REQUEST_FILENAME} "sitemap.xml" RewriteRule ^(.*)$ sitemap_book.xml [R] but it doesn't work without [R]. Gives 400 ...

What does Apache need to support both mysqli and PDO?

I'm considering changing some PHP code to use PDO for database access instead of mysqli (because the PDO syntax makes more sense to me and is database-agnostic). To do that, I'd need both methods to work while I'm making the changeover. My problem is this: so far, either one or the other method will crash Apache. Right now I'm using XA...

mod_rewrite: do not apply here

I am using mod_rewrite to put a category name in the URL, like locahost/categoryName and also a location localhost/categoryName/locationName . One question I had, and I'm sure it's easy to do as a rewrite rule, is how can I make it so that the rule does not apply to some specific directory, like: localhost/admin . In that case I want it...

AuthUserFile override for child directory in .htaccess file

I have a directory structure similar to: - html    - sites       - .htaccess    + files    - .htaccess    - index.php The file /html/.htaccess uses AuthUserFile to protect the entire site. However, the /html/sites/.htaccess file is also used to protect the "sites" folder with a separate password. The problem is when I attempt to visit a...

How do I setup my Rails Apps to Run through Phusion Passenger?

Hello folks, I have the following doubt: I have an application in Rails+MySQL and I want to run this with Apache + Passenger, I have both installed, but when I run ./script/server my app starts running with WebRick, how do I change it for work with Passenger and Apache? P.S: I'm on Ubuntu 9.04 Jaunty Jackalope, please consider the fact...

Can ap_internal_redirect be used safely from within an Apache authentication handler?

I would like to call ap_internal_redirect from within my Apache 2.0 module that is set up as a check_user_id hook, so that I can return a different page under some error scenarios. Following the documentation in the Apache header, I follow the call to ap_internal_redirect by returning OK. However, this still leads to the authorization p...

Communicate to Apache Server

Hi, Does any one know, how to communicate to Apache server from client side using Win32 or C#. and can i get the control to execute the process at server? if so how to do?. how to receive file sent by apache?. Please help me... Thanks ...

Apache - Prettifying URLs with mod_rewrite while also catching some edge cases

Sorry to bug everyone with another mod_rewrite problem but you know the drill. Basically, I have viewer.php, which accepts two arguments, chapter and page. Sometimes people will request a chapter only, and sometimes they will request a chapter and page. i.e. viewer.php?chapter=10 or viewer.php?chapter=10&page=5. The php is smart enough ...

Android: Problem/bug with ThreadSafeClientConnManager downloading images

For my current application I collect images from different "event providers" in Spain. Bitmap bmp=null; HttpGet httpRequest = new HttpGet(strURL); long t = System.currentTimeMillis(); HttpResponse response = (HttpResponse) httpclient.execute(httpRequest); Log.i(TAG, "Image ["+ strURL + "] fetched in [" + (System.currentTimeMi...

Apache basic authentication

I apologize before hand if this is an obvious question: can Apache 2.0 + SSL + basic authentication be trusted in order to secure a website? The way I see it, SSL creates a secure connection between the client and the server and thus any HTTP requests containing the clear-text password should not be a security issue. thanks, S. ...

How did wamp server install phpmyadmin?

It's very strange because phpmyadmin is not in document root, but still can visit it by:http://localhost/phpmyadmin. ...

Redirecting all uri's to script possibly with htaccess

I am trying to design a small site where most of (95%) of site assets will be passed through home sort of PHP script, and the remaining 5% are being hosted from a subdomain (background images, logos, etc. What I would like is that whenever a page is called, say www.example.com/blog/My_trip_to_the_andes the page that would be called is h...

Appropriate usage for JSON?

Great site! I have a question I haven't seen answered. I am very new to this, I didn't know what JSON was yesterday, so I apologize if this is a stupid question. A client has requested an JSON/XML type scheme to store data because they want a flat file to edit/update without having to deal with queries, and they want it flexible for fu...

How to Disable Django / mod_WSGI Page Caching

I have Django running in Apache via mod_wsgi. I believe Django is caching my pages server-side, which is causing some of the functionality to not work correctly. I have a countdown timer that works by getting the current server time, determining the remaining countdown time, and outputting that number to the HTML template. A javascript...

htaccess rewrite not working for all rules

This is a very strange problem, and I just hope that I can clearly explain it. Basically, we made a major update on a client site today, and needed to update some rewrite rules in the htaccess to accomodate the new structure, etc... So, where we originally had things like: RewriteRule ^/resources/?$ index.php?id=resources RewriteRule...

My cgi script can't write to cgi-bin folder of Apache

I m working on a python version cgi script which needs to create img files (which will be shown on the web page) in cgi-bin folder. But it fails with: [Wed Oct 28 16:13:51 2009] [error] [client ::1] OSError: [Errno 13] Permission denied: 'average/' [Note] 'average/' is the folder that the cgi script is going to create first for saving...

Django + WSGI: Refreshing Issues?

I'm developing a Django site. I'm making all my changes on the live server, just because it's easier that way. The problem is, every now and then it seems to like to cache one of the *.py files I'm working on. Sometimes if I hit refresh a lot, it will switch back and forth between an older version of the page, and a newer version. My se...

Difference between Apache Struts and Java EE?

I'm currently learning Java EE, or more specifically, Servlets and .jsp. In my programming, I already employ the Model-View-Controller model to write my code. And as far as I've googled, Apache Struts is just a server like Tomcat. So, what exactly is Apache Struts, in relation to Java, Java EE, and Servlet classes in Java EE? ...

Consuming java written webservices without adding web reference in c#

how to Consume java(apache axis) written webservices without adding web reference(in visual studio) in c# ...

Interceptfiles I/O of files in Apache

Hi How i can intercept Apaches files input/output? What i'd like to do is app or dll file that will enable people to use php/asp to read/write files as if they ware in normal server. But the files physically would be stored elsewhere. ...