apache

.htaccess mod_rewrite is preventing certain files from being served

i have a successful use of mod_rewrite to make a site display as i wish... however, i have migrated the 'mock-up' folder to the root directory and in implementing these rules for the site, some files are not being served in the ^pdfs folder: RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] (old directory) RewriteRule ^redesign_...

How to run multiple versions of a Django app with mod_python?

I want to set up test and production versions of a Django app on separate apache name virtual hosts and wanted to know the best way to do this. Here's what I've done, and it seems to work ok, but I'm wondering if there's a better way. <VirtualHost *> ServerName test.foo.bar <Location "/app/"> SetHandler python-progra...

validating .htaccess before deployment

In order to get better SEO and cleaner URLs, I tend to export certain RewriteRules directly into the .htaccess (eg, RewriteRule ^The_North_Face(.*)$ index.php?a=brands&id=27&extras=%1 [NC,L] and so forth for each brand or category). It's a lot more complex than that but today I discovered that the file is only as good as the data it's tr...

WAMP not sending file headers (content-type) correctly

Hi! I cant get a PHP file to send correct headers at my WAMP server. Wouldn't be a problem normally except that is phpMyAdmin that is freaking out and that the main css files are not working in Firefox. Here's the row that in the file that merges the css files together, used to send the output as CSS. header('Content-Type: text/css; c...

.htaccess - redirect favicon

How do I redirect all requests for favicon.ico in root directory or any subdirectory to /images/favicon.ico ...

how do I redirect a user to a certain page using .htaccess

I have the following rule defined in the .htaccess file of my webapplication's root directory. RewriteCond %{REQUEST_URI} !^/classes/captcha.php RewriteRule ^([^/]*)/([^/]*)$ /index.php?client=$1page=page1 Now what I want is that when a user types in http://xyz.com/abc/page1, the address bar of the browser should display the origina...

In Apache .htaccess file using mod_rewrite, is it possible to force www AND force https for a domain ?

RewriteCond %{HTTP_HOST} !^www.example.co.uk$ [NC] RewriteRule ^(.*)$ https://www.example.co.uk/$1 [R=301,QSA,L] thats for the www, but I cannot figure out in a one-pass way how to force the https too? ...

How to access codeigniter files from one directory to another different directory

I have XAMP installation, with htdocs in D drive. I copied Codeigniter/System folder to E drive. Now when i type http://localhost, i should able to access E:/Codeigniter/System/index.php How can i achieve this. ...

Compiling LAMP from source - apache2 error "no MPM package installed"

Hi, I've compiled LAMP from source on a Ubuntu VPS. I had to remove a previously installed version of Apache then I manually compiled all the packages, which seems to have worked up unto a point - when I try to run commands like "/etc/init.d/apache2 restart" I get the following error - No apache MPM package installed. I have deliberately...

Apache MINA reading from IoSession

Dear Readers, I am new to Apache MINA kindly guide me how to read from IoSession. I have stored a POJO in it. public static EchoUDPServerDiscoveryObjectResponseProperties echoProperties session.write(echoProperties); ...

Apache Rewrite: directory tree to subdomain directory

I have a web application that has one set of files used by 50+ clients and all the configuration for each site comes from a config.php file in their respective directories. This is accomplished with PHP parsing the URL. All this works fine, just having an issue with custom uploaded documents the client can do and are located in /var/w...

XAMPP Apache Problem

Hi! I need to use Wordpress with XAMPP for a task in a study project. I installed XAMPP, and now i'm supposed to start MySql and Apache from the Xamp Control Panel. If I start the panel, it displays: XAMPP Control Panel Version 2.5.8 (2009-07-28) XAMPP for Windows Version 1.7.3 Windows 5.1 Build 2600 Platform 2 Service Pack 3 CurrentD...

Rails page caching with intra-page administration

I'd love to use page caching on a Rails site I run. The information on each page is mostly constant, but the queries that need to be run to collect the information are complicated and can be slow in some cases.The only obstacle to using page caching is that the administrative interface is built into the main site so that admin operations...

Apache setting mod_auth_ldap require settings per sub-directory

I would like to set up a primary directory that has one set of LDAP-based restrictions and then have various sub-directories use other restrictions, but only have the actual LDAP search done in the base directory. For example: .htaccess per directory /Primary_Directory AuthLDAPURL "ldap://ldap1.airius.com:389/ou=People, o=Airius?uid?...

Speeding up site using gzip and far-future expiration dates.

I recently deployed a site http://boardlite.com . One of the tester websites http://www.gidnetwork.com/tools/gzip-test.php suggests that gzip is not enabled for my site. YSlow gives an A grade for Gzip but does not mention that gzip is on. How do I make sure the site properly implements Gzip. I am also going to enable far-future expiry ...

Impose access limits from Apache to prevent scraping ?

Hello, The problem is of a content website that is being scraped so badly that it breaks the server. Is there an easy method of limiting access for IPs to a fixed number of requests at a time OR per day ? ( 10 pages / day or.... 10 pages every 2 minutes ) Ideally, I would keep a wildcard list for search engines and disallow everybod...

How to password protect files (images, video, zip) dynamically from public and allow access to members only?

It's a common problem, solved many times, but for some reason i cannot find the right information. Some constraints and requirements: Technique for LAMP stack. Fine-grained control of which files are accessible. No basic authentication with htpasswd files, i want to provide a custom login frontend. Should be able to securely protect a...

how to run xampp on cd?

I have a product catalog using apache, php and mysql. I need to put it on a CD, so it can be run from it direclty. What possibilities are there? ...

django deployment apache

I would like to create a python script, which will: Create a django project in the current directory. Fix settings.py, urls.py. Do syncdb Install new apache instance listening on specific port (command line argument), with WSGI configured to serve my project. I can't figure out how to do point 3. EDIT: Peter Rowell: I need the s...

.htaccess mod_rewrite just broke the site...

hello, in the following .htaccess file... RewriteEngine on RewriteCond %{HTTP_HOST} ^getpearson.com$ RewriteRule ^/?$ "http\:\/\/www\.getpearson\.com" [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] RewriteRule ^rede...