apache

Url rewriting issue

i have used the following code in .htaccess Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteRule ^company/aboutus$ aboutus.php [NC,L] RewriteRule ^company/contactus$ contactus.php [NC,L] RewriteRule ^company/careers$ careers.php [NC,L] RewriteRule ^/$ index.php [NC,L] the above code works but aboutus page loading...

simple document server built over Apache HTTP server

Hi, I want to build a simple document server. The requirement for now is : provide a hierarchical directory structure for placing documents (like pdfs, doc files) that is accessible through a browser, and provide the facility to search for documents by name and then be able to download them from server. Right now, placing documents ca...

Is it necessary to turn off DEFLATE for all versions of Internet Explorer?

Following the example, I've configured Apache to only compress text/html for MSIE. Is this necessary for newer versions of Internet Explorer? BrowserMatch \bMSIE !no-gzip !gzip-only-text/html ...

http 301 redirect from htaccess to domain host

Hi I have the following in a .htaccess file redirect 301 /page.php http://domain.com/page Which works fine and as expected. I want to be able to redirect the following http://domain2.com/page.php to http://domain2.com/page or http://domain3.com/page.php to http://domain3.com/page or http://domain4.com/page.php to http://domain4....

Is there a way in PHP to keep a file open and process each line and subsequent lines?

I want to write a php script that keeps the apache_log file open and "listen" to the log and deal with each log entry as it happens. I'm thinking that I need to open a file, get the number of lines, then do this again in a loop - and when the size is different, read the new lines and process them. Am I barking up the wrong tree, or is ...

HTTP client - HTTP 405 error "Method not allowed". I send a HTTP Post but for some reason HTTP Get is sent.

Hey I am using the apache library. I have created a class which sends a post request to a servlet. I have set up the parameters for the client and i have created a HTTP post object to be sent but for some reason when i excute the request i get a reposnse that says the get method is not supported(which is true cause i have only made a d...

Zend Framework - no public folder

Hello, I'm going to host an app on a shared host and there I couldn't create virtual host or change something at apache. Often apps with ZF looks like that: root public index.php .htaccess application library I have sth. like that: root application index.php .htaccess All my code is in the application folder. Bu...

modrewrite php query string

I would like to change: http://example.com/index.php?p=blog&pid=2&lid=1&l=en into just http:// example.com/en/blog.html or just http:// example.com/blog.html thanks in advance! ...

Passenger, Apache and avoiding page caching

I'm hosting a rack application with passenger and apache. The application is setup to cache the content of each request to the public directory after each request. This allows apache to serve the content directly as a static page for future requests. I would like to tell Apache, presumably through some rewrite rules that any requests wi...

MPM Prefork Apache Uses Absurd Amount of Memory

Help! My apache processes are all using 115MB of memory on startup. Relevant information: Linux version (uname -a) Linux 2.6.31-14-generic-pae #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009 i686 GNU/Linux Apache version (/usr/sbin/apache2 -v) Server version: Apache/2.2.8 (Ubuntu) Server built: Mar 9 2010 20:45:36 Top display (top...

Nginx not responding to remote IP

I just installed Nginx listening on 8083 I can get a HTTP response when sending a HTTP request from the local machine. eg: curl -i localhost:8083 However, when I do the same from a remote machine, it just hangs until the ssh times out, or when the browser times out if accessed from the browser. I pretty much have the default confi...

problem with XAMPP, access forbidden... looking for d:\xampp not c:\xampp

I have been using xampp for a while now without any problem. All of a sudden I start xampp today and I am getting an "Error 403 Access Forbidden" when I try to go to my Localhost. When I check the error logs for apache it says: [Mon Mar 22 21:48:57 2010] [error] [client 127.0.0.1] client denied by server configuration: D:/xaamp This ...

Can somebody give a high-level, simple explanation to a beginner about how Hadoop works?

I know how memcached works. How does Hadoop work? ...

I am currently serving my static files in Django. How do I use Apache2 to do this?

(r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}), As you can see, I have a directory called "media" under my Django project. I would like to delete this line in my urls.py and instead us Apache to serve my static files. What do I do to my Apache configs (which files do I change) in order to...

redirect http to https for some page in site in APACHE

Hi I want to one of my site's page will use only HTTPS. I have given manually link to all sites to https. But I want that if user manually types that page URL with http then it should be redirected to https page. So if user types: http://example.com/application.php then it should be redirected to https://example.com/application....

Get address bar without parameters.

Help me please get the value of the address bar of browser without the parameters passed. Without the use of regular expressions and string functions. You can do this? (I use php on apache). enter http://dev.mazda-parts.ru/catalogue/?spattern=1 exit http://dev.mazda-parts.ru/catalogue/ ...

Apache LogFormat IP Address

I am using the following LogFormat in my httpd.conf: LogFormat "%h %l %u %t \"%r\" %>s \"%{Referer}i\" \"%{User-Agent}i\" %a %t" combined It's working ok, but for some reason the IP address is coming out as ::1. Is there a particular reason why Apache isn't logging the users IP address? Edit: Here is an example log: ::1 - - [23/Mar/...

It is possible to get mod_rewrite urlBase server param via php?

Could i get the apache mod_rewrite definition of urlbase via php scripting? ...

.htaccess mod_rewrite issue

Almost in any project I work on, some issues with .htaccess occur. I usually just find the easiest solution and leave it because I don't have any knowledge or understanding for Apache, servers etc. But this time I thought I would ask you guys. This is the files and folders in my (simplified) setup: /modrewrite-test .htaccess /c...

Apache BeanUtils.copyProperties is spilling too much log

How can I switch off logging for BeanUtils.copyProperties ? It creates way too much logs and hampers the log file readability. Thanks heaps.. Sample code BeanUtils.copyProperties(someDataobject,someActionForm); In the log I see hunders of lines like below EBUG org.apache.commons.beanutils.PropertyUtils - setSimpleProperty: In...