apache

Apache mod rewrite ruleset

The problem is roughly - I need a request path like this: host/var1/val1/var2/val2/var3/val3/... to be overwritten like: host/index.php?var1=val1&var2=val2&val3=var3&... Any ideas ? ...

.htaccess for clean URL not working

I am working with PHP and htacess for the first time. I am passing a variables in a query string to a URL and want this URL to look clean. Please help. .htaccess file RewriteEngine On RewriteRule ^id-([0-9]+)/([0-9A-Za-z]+).html /detail.php?id=$1&display=$2 PHP code passing from one file to detail page URL is: <a href='/detail.ph...

org.apache.commons.lang.StringEscapeUtils in python

Hello, is there any python module or code that implements the org.apache.commons.lang.StringEscapeUtils.escapeHtml ? exactly the same as in http://commons.apache.org/lang/api/org/apache/commons/lang/StringEscapeUtils.html#escapeHtml(java.lang.String) i googled around but could only find the cgi.escape function that doesn't do the sam...

How can I show a maintenance page when my FastCGI app is restarting?

I am serving my FastCGI application in Apache2 using the standalone FastCGI server and the FastCgiExternalServer directive. When I restart my FastCGI app my users get a 500 error. What can I do to prevent this? I want to show them a nice 'maintenance' page or something. It is a Catalyst application written in perl and I have followed t...

Mod_rewrite invisibly: works when target is a file, not when it's a directory.

I have this rewrite rule that turns foo.com/test (or foo.com/test/) into foo.com/test.txt: RewriteRule ^test/?$ test.txt [NC,L] It works perfectly and, importantly, never reveals to the user that the "real" URL is foo.com/test.txt. Now I want to do the same thing where the "real" URL is foo.com/testdir, where testdir is a directory: ...

Server software choice for Django live/staging

For developing our Django web app, I'd like to move to an autonomous system that automatically updates the source (from VCS) of a staging copy of the app which has near identical properties to the live version of the application. The general idea of doing this has already been covered here on SO #625256. The Django documentation also t...

Apache Webserver & JBoss AJP connectivity with https

We are hosting a JEE Application running on JBoss. For security reasons this application that should be available on the internet is protected with a front-end Apache server. We are using AJP to enable this. This works fine when we access the application through http. When we try to do this with https, it doesn't work, we get a 404 erro...

How to setup .htaccess redirect for particular category blogs (wordpress)

I have URL scheme for my blog like this: http://www.example.com/%YEAR%/%MONTH%/%CATEGORY%/%POST%5FTITLE%/ Now i want to redirect a particular category blogs to a different domain. The URL Scheme on that other domain is similar. Please suggest me how can i do it using .htaccess ...

.htaccess Redirect non-WWW to WWW preserving URI string

I'm running the CodeIgniter platform, which uses .htaccess to accept URLs like http://www.mysite.com/controller/function/argument I currently use some .htaccess rewrites, namely (simplified): RewriteEngine On RewriteCond %{REQUEST_URI} !^(/index\.php|/images|/assets) RewriteRule ^(.*)$ /index.php/$1 [L] I want to add a rewrite rule...

zend community server very slow on first request with OS X 10.6

I have installed Zend CE 4.0.5 for php 5.3 on my Mac Book Pro running Snow Leopard osx 10.6. I use this setup for my local development environment. When I haven't done a request in a while ( > 20 mins) or after a reboot, the first request takes quite some time to respond. Maybe 45 seconds. After that initial lagged request it acts as...

Performance-oriented way to protect files on PHP level?

I am looking for some input on something I have been thinking about for a long time. It is a very general problem, maybe there are solutions out there I haven't thought of yet. I have a PHP-based CMS. For each page created in the CMS, the user can upload assets (Files to download, Images, etc.) Those assets are stored in a directory, ...

Trouble with advanced .htaccess redirect

I'm migrating a custom coded blog over to Wordpress, and have to set up a redirect that will handle all of the blog posts. I need to redirect from this: /oldblogdirectory/Old_Blog_Posts_Looked_Like_This.htm to: /newblogdirectory/new-blog-posts-look-like-this/ Any ideas on the regex for a redirect like this? ...

.htaccess rewrite to default language folder?

I have my site broken down into several folders by language: / /en/ index.php about-us.php faq.php ... /fr/ index.php about-us.php faq.php ... ... etc. I'd like to have a rewrite rule that automatically rewrites to the en folder if somebody tried to enter mydomain.com/about-us.php. FYI, I als...

.htaccess mod_rewrite rule not working in Ubuntu

My apologies if this is an easy one. I have Googled it up the hizzy to no avail. I am running Ubuntu 9.04, Jaunty Jackelope and Apache2. After much trouble, I finally enabled mod_rewrite, and my .htaccess file is attempting to do it's thing, but is failing. This is my setup. In /etc/apache2/conf.d/ I have a file called apeace-public-ht...

Get started with QPID

Hello Could anyone share some links on how to get started using QPID? I have checked out http://qpid.apache.org/ and I have managed to start the Java QPID broker, but I don't know where to go from here. It would be great if someone had a sample app or two to use the broker and send messages to each other, in Java or C#. If not, maybe...

what is the real version for "Apache/2.0.63 (Unix)" in a HTTP response header?

Hello, I'm trying to install Apache with the version matching that of a specified server. Yet I'm stuck at finding the true version of the server given its HTTP response header: Apache/2.0.63 (Unix) PHP/5.2.6 DAV/2 mod_ssl/2.0.63 OpenSSL/0.9.8 I've looked at the http://tomcat.apache.org/whichversion.html but it does not match. Apparen...

Splitting https between Apache and Game Server

Hi, i want to have both an Apache and a Game Server to be reachable on port 443 of the same IP address. The game server connection is a normal TCP connection that is established when the client logs in and stays open until the client logs out, perhaps hours later. At first I though about using mod_proxy in reversed mode and let the cl...

.htaccess not working

RewriteEngine on RewriteCond $1 !^(index\.php|files|assets|robots\.txt) RewriteRule ^(.*)$ ./index.php/$1 [L] The website is hosted on the latest version of XAMPP locally. When I load the website with the .htaccess file in place, it won't load at all. I get a server error What am I doing wrong? EDIT: Checked log file, here's an error...

Apache configuration. How to forbid root folders viewing

I've added VirtualHost ServerAdmin root@localhost DocumentRoot /var/www/html/blogovet.ru ServerName www.blogovet.ru ServerAlias blogovet.ru But my script in this domain can see all server files /* not only in his directory /var/www/html/blogovet.ru How to forbid viewing files except DocumentRoot ? ...

Django on Apache with FCGI

Solved: Unfortunately I wasn't able to solve the problem but I started over and followed the Django + FastCGI guide on the "A Small Orange" wiki and everything is working as expected. I am trying to setup Django with FCGI on Apache. The web hosting plan that I am using is A Small Orange's shared hosting plan. Django is installed, worki...