apache

php and htaccess

In the .htaccess file can we change the file extention to be display. Like my .htacces file rewrite any .html files to .php fileS WITH THE BELOW CODE. RewriteEngine On RewriteRule (.*).html$ $1.php [L] If the URL typed as http://localhost/test/test.html it will internally called test.php file. However I would like the page to have th...

Java with Drupal-6/PHP

I really dislike PHP, but am pretty comfortable in Java. I have a stable Drupal installation that has been deployed to an Apache/Linux server. I don't know if the server currently supports Java. (What does it take to do that? I have programming in desktop apps for Java but never online before.) For developing new modules for my site, is...

Apache Rewrite Rule Problems

I have a list of folders in the htdocs that I want to include in my Apache configuration file, but I don't want to include every directory that's there manually, as more may be added later. I have 5 or so folders redirecting correctly, another redirect that does to the old index.htm in the htdoc's folder and another that does to the che...

stop apache injecting it's own 404 not found page to the custom 404 error page

I'm having a problem implementing custom 404 error pages. my setup is a front-end apache 2.2.6 proxy request other than static file to the backend app server(apache 1.3.36) i send 404 header back along with error page when user request a non-existing page to the backend server. I do get the error page back but somehow the backend apache...

Rewrite rules showing in location bar of browser.

I have the following rewrite rules: <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / # Route all URLs to dispatch.php. RewriteCond %{REQUEST_URI} !media/ RewriteRule ^(.*)$ dispatch.php [L] #Route requests to /media/* to /project/media/* RewriteRule ^media/(.*)?$ project/media/$1 [L] </IfModule> Everything is r...

Problem with Apache and PHP (using PEAR)

Hello! I have a problem with Apache, which restarting, when I want to open PHP code in browser. Code : require_once 'DB.php'; PEAR::setErrorHandling(PEAR_ERROR_DIE); $db_host = 'localhost'; $db_user = 'root'; $db_pass = 'marylover'; $db_name = 'test'; $dsn = "mysql://$db_user:$db_pass@unix+$db_host/$db_name"; $db = DB::connect($dsn); ...

How many PHP scripts can run concurrently via http request?

Hello all, I know PHP scripts can run concurrently, but I notice that when I run a script and then run another script after it. It waits for the first to finish and then it does what it has to do? Is there an Apache config I have to change or do I use a different browser or something?!! Thanks all EDIT If I go to a different browser...

Problem with Apache on Mac OS X

I'm using Apache for my website, so that I can see it on other computers on the LAN, and it worked fine until recently, where I suddenly can't access my site from my local IP, even through I have web sharing enabled. I just get a message that it can't connect to the server. I can still visit it through localhost. When I start Apache thro...

restrict access to page to only be allowed from a certain page

This question is similar to the one i asked here. But its related because I want to achieve the same effect. I want the users to be restricted to only accessing other pages on the site through the main page. The first page contains a frame for navigation and then a frame for content of the page they navigate to. I want it to be setup so ...

Pages loads twice on Firefox?

Hello all, I thought I had answered this question before thanks to StackOverFlow, but I hastily took an answer and it turns out not to be the real cause to my problem. I have checked my Apache Access Log: This is me browsing my web app on Google Chrome Browser. 127.0.0.1 - - [06/Jan/2010:22:17:35 +0000] "GET /webs/end/new.php HTTP/1...

Subversion (Svn) Propfind 405 error

I am brand new to subversion and have been told that this is the best thing since sliced bread. I have tried google and I am just drawing blanks on what is wrong and have tried multiple different suggestions. I get the following error The Location information has been specified incorrectly. svn: Propfind of '/svn': 405 Method not all...

How can I detect if a cookie exists using the Ruby programming language?

I know how to read cookies using CGI and Ruby but the problem is, if I try to read cookies.value[0] when it does not exists, it breaks my program. So I need to check if the cookie is there to read first. I can't find this answer anywhere on the internet. Please help, thank you, Henry. ...

Unable to create a file in Apache modules

I am trying to create a file in Apache for writing debugging messages (Just to write some log messages).. But unable to create a file under Apache module. Just check out my code & kindly help me out! Do advice me with a code snippet, is there any way to log debugging messages under Apache?? ============ (Header files are removed for ...

How can I use mod_rewrite to remove everything after the ? (question mark) in a URL?

How can I use mod_rewrite to remove everything after the ? (question mark) in a URL? For instance: http:// 127.0.0.1/ALL_FILES.php?test=1 after mod_rewrite: http:// 127.0.0.1/ALL_FILES.php For php this means that the $_GET super global will always be empty for all files on the system. Thank you. ...

Apache, LocationMatch: match query string

How can I match a query string using LocationMatch with apache? <LocationMatch "/index.php?a=b.*"> // ... ... won't work unfortunately. Kind regards ...

Strange behavior change in mod_rewrite

Hello, In a .htaccess context, I have a simple rewriting rule : RewriteEngine on RewriteRule ^dir/([^/]+)/(.*) action/do.php?a=$1&b=$2 [L,QSA] dir and action are in the same directory, which is also my DocumentRoot. When accessing http://example.org/dir/a/b the request should (and was) rewritten to http://example.org/action/do.php?a...

Apache Mod Rewrite

In my Apache configuration, I have the following statement: RewriteRule ^/classic(.*) /$1 [nc,l] This will return all statements to http://localhost/classic basic the base htdoc folder (so index.html is used) I want to be able to enter http://localhost/classic/somefolder and make it go the a specific folder in the htdocs. How would ...

Redirect subdomain to /folder

I want to redirect the sub-domain webmail to /roundcube for that domain. This have to work for all virtual hosts in apache. Example: webmail.example.com must point to [www.]example.com/roundcube How is this possible? The server where it has to be done is configured with direct admin :S ...

How can I avoid zombies in Perl CGI scripts run under Apache 1.3?

Hi guys, Various Perl scripts (Server Side Includes) are calling a Perl module with many functions on a website. EDIT: The scripts are using use lib to reference the libraries from a folder. During busy periods the scripts (not the libraries) become zombies and overload the server. The server lists: 319 ? Z 0:00 [scriptnam...

Will enabling `mod_status` in apache slow my app down?

If I wanted to to monitor response time of my requests should I use Apache's mod_status or should I use Passenger's passenger-status monitoring tools? My concern is that enabling mod_status will slow my apps down, but I don't have anyway to compare since I need to run mod_status to benchmark the performance. By the way Passenger's pas...