apache

Apache's ErrorDocument directive for asp/IIS ?

now i saw a very good php script and i rewrite it to asp the script here:Fantastic Animation PHP/CSS/jQuery Error pages but know iam in big problem how i can use .htaccess in asp see how it work ErrorDocument 500 /error.php?code=500 can i use .htaccess in asp please tell me because iam newbie in it because know i convery error.php to ...

How do I map different server names to differrent DirectoryIndex in PHP Symfony?

Symfony uses the following typical .htaccess file: Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] </IfModule> and I have this as my vhost: <VirtualHost 1...

Apache shows .htaccess for some sites

Hello, I've setting in httpd.conf to restrict access to .htaccess files for all sites and it's working for most of the sites. Unfortunately, I can see .htaccess file from web browser at one of my sites. What can be the reason for that and how can I avoid it? Thanks in advance. ...

PHP & Apache - parse mod_rewrite url

Hi, I have my server's apache configured to redirect every request into index.php, so that I can use urls like : http://www.website.com/about/us Now I need to parse the url in order to determine if each route exists and what to expect from it, so I can set a database table to save the routes and so my clients can edit their routes as...

(django initial setup) Django installation is redirecting all traffic to django page, fix?

I'm a complete newbie to Django. I've been trying to get it working on my Ubuntu server. everytime someone my server, it redirects to the "Congratulations on your first Django-powered page." It completely ignores the index.html file in the www directory. Why is that? Is there a away to make it so that it only goes to the django page whe...

SVN Import: "Error: Could not open the requested SVN filesystem"

Hi All! I try to import my old project to new SVN server (svn + web_dav+apache), but however I get some weird error while importing with tortoiseSVN. Adding: C:\tmp\carpirate\test Adding: C:\tmp\carpirate\test\crawlerTestSuite Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestP2p.java Adding: C:\tmp\carpirate\test\crawlerTestSui...

How to send an image through HTTPPost ?

Hello there, i'm creating an activity which needs to upload an image to a webservice using their api. I found that if i use UrlEncodedFormEntity and send the image data through that. the webservice doesn't receive that. ( at least it will not be able to read that .) In fact if i add some vars to send with the image data ( like name of ...

Deploying Pylons with uWSGI

Hi all, We're trying to move our intranet to Pylons. My boss is trying to set up Pylons to use uWSGI behind Apache so he can set up multiple, independent applications. However, he's having a difficult time getting it set up, with some apparent code problems in the C source code for uWSGI. Does anyone have any suggestions for how to depl...

CruiseControl.rb PATH

I'm trying to get CruiseControl.rb to run rcov during a build. It's currently failing with the following error: sh: rcov: not found Since I can run rcov from the shell when I log in, I figure that this is a PATH problem. (Additionally, I can run both rake test:rcov and rake cruise from the shell without errors). I added a p 'echo $PA...

403 Forbidden on symlink in web root

I am on a shared hosting package on a LAMP stack with no shell access. I can create symlinks using PHP's symlink() function. Let's say my web root is /home/www/user1/public Let's say I have a real directory named /home/www/user1/public/real_dir And I create a symlink named /home/www/user1/public/fake_dir pointing to real_dir Why wo...

Auto-redirect requests from /dirname to /dirname/

Could somebody assist me in formulating the following .htaccess rule: if an incoming request contains a top-level directory path like www.example.com/dirname automatically convert this to www.example.com/dirname/ but only for the top level, so requests to www.example.com/dirname/subdirname remain untouched. Do I need mod_re...

How can I make the -f flag apply to directories with a trailing slash?

I am building a .htaccess file with a fairly complex ruleset. One of the basic rewriting rules is this first line: If a requested file exists physically, no rewriting, stop processing rules. RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] this works well with one exception: When I acces...

Cleaning up nested mod_rewrite statements

I am cleaning up a large .htaccess file containing a lot of mod_rewrite statements. The biggest part of the clutter comes from statements catching various occurrences of /directory1 /directory1/directory2 /directory1/directory2/directory3 using statements like RewriteCond %{REQUEST_URI} ^/([^/]+)/([^/]+)$ RewriteRule .* /front....

.htcaccess redirect ONLY root ("/") to sub folder

I have a site that is arranged thus: /about /css/ /index/index.php /js/ /index.php index.php uses a PHP redirect to index/index.php I want to create a .htaccess rewrite rule so that when the root is accessed, /index/index.php is displayed BUT /about etc. stays the same. ...

Do HTTP authentication over HTTPS with URL rewriting.

I am trying to protect the ~/public_html/dev directory using http auth basic, but to make that secure I want to run it over ssl. The middle section of the below .htaccess file switches to https if the request URI begins with /dev and works. The last section of the file works as well but does not work properly with the https redirect. ...

How to simulate [L] in .htaccess

I have a .htaccess file with a number of RewriteRules. How can I exclude already existing files and directories from having run through each of the RewriteCond / RewriteRule pairs? This: RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} -d RewriteRule .* - [F,L] won't work reliably because according to this SO q...

Is there a svn or git solution that enables live preview

Hi guys! I would like to know if there is a solution (open source project or webservice) available that offers a svn or git repository together with an apache server and database. I am searching for such a solution because I would like to get the benefits of developing with a subversion system. On the other side I need a preview of the f...

Dynamic apache setting using PHP

Hi, starting new project where users can register and system will automatically install cms system for users registered domain and need to solve dynamic setting of the server (apache). Registration information and info about the associations between domains and actual paths to the cms installation on the server will be stored in Mysq...

Apache Tiles 2.1.4 with CSS

Hi, I am using Apache Tiles 2.1.4 with Spring MVC 3. I have managed to configure these together and everything works fine. My next step is to add CSS and this is where I am having an issue - this is most probably a simple one but I can't get my template jsp to pick up the css. Snippet from my tiles-defs.xml <definition name="baseLayou...

URL Encoding with Underscores in a Directory Name?

We've run into an odd argument where I work, and I may be wrong on this, so this is why I am asking. Our software outputs a directory to an Apache server that replaces an underscore with a %5F in the name of the directory. For instance if the name of the directory was listed as a string in our software it would be: "andy_test", but t...