Apache Web Server




Articles & Videos



The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

Share tech news, updates, or what's on your mind.

Sign up to Post

I need to write a rule in my apache htaccess file to redirect:


The rule I wrote is as follows, but it does nothing:

RewriteRule ^insurance-plans\/year\/schools\/international-student-plans-2015?s=136&l=5000$		http://%{SERVER_NAME}/insurance-plans/year/schools/international-student-plans-2017?s=136&l=7000	[R=301,L,NC,NE]

Open in new window

I'd be grateful if someone would show me the correct htaccess code to implement my redirect.

Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Hello experts,

Need some help

We have migrated a website from cpanel accelerated2 to another hosting provider who provided latest version of cpanel. The transfer was successful. However while browsing the website we are seeing below error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@xxxx.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

I have gone through the error logs in cpanel which is logging below error everytime the domain is accessed.

corealert: pid xxxxx /home/xxx/public_html/.htaccess unknown filter provider deflate

At first we though php version 5.4 not installed is the issue, we have installed 5.4 via cpanel and restarted the http webserver but still same error.

Unable to understand where to look for

Any help is appreciated.

Thank you

best regards
Hello Experts,

What's wrong with this code: ??  ( in httpd.conf )

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !="[1-50]\.[0-255]\.[0-255]\.[0-255]"
RewriteRule /scripts/(.*) http://localhost:81/scripts/$1 [P,L]
RewriteRule /game/(.*) http://localhost:81/game/$1 [P,L]

RewriteCond %{REMOTE_ADDR} !="[51-99]\.[0-255]\.[0-255]\.[0-255]"
RewriteRule /scripts/(.*) http://localhost:82/scripts/$1 [P,L]
RewriteRule /game/(.*) http://localhost:82/game/$1 [P,L]

RewriteCond %{REMOTE_ADDR} !="[100-150]\.[0-255]\.[0-255]\.[0-255]"
RewriteRule /scripts/(.*) http://localhost:83/scripts/$1 [P,L]
RewriteRule /game/(.*) http://localhost:83/game/$1 [P,L]

RewriteCond %{REMOTE_ADDR} !="[151-200]\.[0-255]\.[0-255]\.[0-255]"
RewriteRule /scripts/(.*) http://localhost:84/scripts/$1 [P,L]
RewriteRule /game/(.*) http://localhost:84/game/$1 [P,L]

RewriteCond %{REMOTE_ADDR} !="[201-255]\.[0-255]\.[0-255]\.[0-255]"
RewriteRule /scripts/(.*) http://localhost:85/scripts/$1 [P,L]
RewriteRule /game/(.*) http://localhost:85/game/$1 [P,L]

RewriteCond %{REMOTE_ADDR} ="192\.168\.1\.[1-255]"
RewriteRule /scripts/(.*) http://localhost:86/scripts/$1 [P,L]
RewriteRule /game/(.*) http://localhost:86/game/$1 [P,L]

Open in new window


Looks like only one instance of my webservice is doing all the heavy work, while the others don't.
The webservices are pre-set to listen to ports 81-88, but looks like the port 81 guy doing all the work.

webservices and their RAM usage...

What I am trying to do is spread the workload to the different web-services listening to the ports, correctly so a better balance-loading is achieved.

I run apache 2.2.16 (win 32) with php 5.3.3.

Any ideas?
For rewrite rule in httpd.conf, it seems following condition & rule should apply:
1. If URL contains string "usedirectory=yes"
Rule: Do nothing

Like following:
Original URL:https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john&usedirectory=yes
Rewrited: No change

2. If If URL contains string ”autoCompleteMembers.do“ and not contains usedirectory=yes
Rule: Append usedirectory=yes to original query string

Like following:
Original URL:https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john

I tried following but not working

<VirtualHost *:443>
     ServerName conn6.win.com
     SSLProtocolDisable SSLv3 SSLv2
     RewriteEngine on

     RewriteCond %{REQUEST_URI} ^/communities/service/html/community/autoCompleteMembers.do
     RewriteCond %{QUERY_STRING} ^(.*)format=v2&member=(.*)$
     RewriteCond %{QUERY_STRING} !usedirectory
     RewriteRule ^/communities/service/html/community/autoCompleteMembers.do(.*) /communities/service/html/community/autoCompleteMembers.do?usedirectory=yes  [R=301,NE,L,QSA]

Hi Guys,

I am having an issue with my server where my server is running really slow, i can see the load avg is pretty high, there is only one site running on it


I have attached the error log and the only issue , is where it says empty input file for http://iradio.ie/newPlayer (which does actually exist)

i have changed DNS over the last 24 hours
I want to put a mod_rewrite rule in httpd.conf to handle mobile requests. If the browser on the sending device accepts mobile stuff, I want to rewrite the request to the original file name with an "m_" in front. So if a mobile device sends

I want to rewrite it to

I have the lines below now in httpd.conf:

RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC]

RewriteRule ^example.com/([0-9]*)/(.*)$ ^example.com/$1/m_$2
But requests from a mobile device don't get rewritten. Does anyone see the problem?

Our production website is using SOLR Search.   I am in the process of standing up a dev/test and staging environment.  Each needs to have it's own instance of SOLR.   My question is this.   How can I see what server SOLR is indexing?   I want to ensure that the dev/test and staging instances of SOLR don't attempt to reference the production VM.
Hi Experts

I need an htaccess rewrite rule to redirect from the following URL format:


to the following URL format:


Note that the part marked in bold is a variable that will change. It can contain one to three letters and/or one to three numbers and can be a minimum of 1 character in length and a maximum of 6 characters in length.

What is the rewrite rule that I need please?

I need htaccess code to make permalinks and redirect them on a single file
like i need example.com/a
these urls to show my index file
I see a lot of this, but nothing seems to be helping. I have a server configured with Apache + nginx running together. I have many WordPress sites and Vanilla 2.1.10 running just fine with pretty URLs via htaccess rewriting.

I'm trying to updated to Vanilla 2.3, but when I upload all the new files I end up with 404s. The README mentions that "Additional setup is required on nginx and other platforms" but it doesn't go into detail.

In the forum and other places, I see people talking about how to fix this, and this link seems to provide the simplest method, which is basically to add this to the nginx vhost:

 location /forum
 try_files $uri $uri/ @forum;
 location @forum
 rewrite ^/forum(.+)$ /forum/index.php?p=$1 last;

Open in new window

Our forum is indeed located at /forum on our site, and we tried this code but it's not fixing the problem.  Any information on how I can get this fixed would be greatly appreciated. Thanks!
How Do You Stack Up Against Your Peers?
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

My site httpS://www.mysite.org and, my subdomain http://subdomain.mysite.org  are working fine. My problem is when I forgot to put httpS on mysite.org (Ex.: http://www.mysite.org) the browser goes to  http://subdomain.mysite.org.

How to solve this problem ?
I want a tool that will run through our website once daily and send a report of any broken links it finds. I can do it either in VB and use Access 2003 here at the office or I can install it as a php app on our  web server.

Any ideas?
I am having little difficulty in resolving one URL redirection in remote location. Example: My website is https://temp.company.local/dev/rel and it's accessible through Remote host. However, when user requests for https://temp.company.local, he is getting redirected to Apache manager page which I don't want. Can you please provide a solution to fix this problem so that only proper URL will work and half will not redirect to tomcat manager page?
Just to update I'm not using IIS.

Best Regards,
Dear experts,
We have a HAProxy installation with SSL-Passthrough (we need the SSL to reach the apache itself for proper HTTP/2 handling so we can't use SSL termination on HAProxy)

However, I can't seem to configure the HAPrxoy to send the real IP to Apache, the logs always show the internal IP of the HAProxy.

This is my HAProxy Config:

# Global settings
    log local2     #Log configuration
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     30000                
    user        haproxy             #Haproxy running under user and group "haproxy"
    group       haproxy
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m

Open in new window

Here is what I have but... it's not masking the URL.  

RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain\.domainA\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.subdomain\.domainB\.net$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "http\:\/\/subdomain\.domainB\.net" [R=301,L]
When I execute my PHP program in netbeans it goes to this address

But I change the address in my wamp server to port 81. My question is where I do change in the netbeans so that every time when i run my program it goes to that address. My operating system is windows 7

im trying to get a .htacess files working, so a url such as http://mydomain.com/incidents/32111/comments turns into http://mydomain.com/index.php?P1=incidents&P2=32111&P3=comments, I managed to get it working, but it redirected everything to index.php, including all images, css and js files (which didnt really work), and now nothing redirects

So, what Ive currently got is:-
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_URI} !=/index.php
RewriteCond %{REQUEST_URI} !.*\.png$ [NC]
RewriteCond %{REQUEST_URI} !.*\.jpg$ [NC]
RewriteCond %{REQUEST_URI} !.*\.css$ [NC]
RewriteCond %{REQUEST_URI} !.*\.gif$ [NC]
RewriteCond %{REQUEST_URI} !.*\.js$ [NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

Open in new window

I cant find much documentation around .htacess files so any suggestions would be gratefully received.

Thank you in advance
How to I configure XAMPP so that I can use it with net beans?
Can you please tell me how to I fix that error? I am using netbeans and wamp in windows 7 environment.
MIM Survival Guide for Service Desk Managers
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

HTTP Status 404 - /example/myapp/list

type Status report

message /example/myapp/list

description The requested resource is not available.

Apache Tomcat/7.0.69
C:\windows\system32>c:\Apache24\bin\httpd -S
httpd: Syntax error on line 532 of C:/Apache24/conf/httpd.conf: LoadModule takes two arguments, a module name and the name of a shared object file to load it from
When I try to restore a db backup (40Mb zipped), It takes around 5 mins to upload and  then around 2 mins later I got this error

Internal Server Error 500 The cPanel Server operation timed out at cpsrvd.pl line 541.

I changed

cPanel PHP max execution time=9000

but it did not help. Any ideas?
Thank you.

I've spent a few weeks messing around with nginx to get to grips with it before I migrate my Wordpress site, (currently on Apache).

One thing can't work out is, In Apache I have a rewrite (in .htaccess) that redirects any request for


It's because the site was originally written in flat html and theres thousands of links going to the old URLs.

In Apache this did the trick
RewriteEngine On
RewriteBase /
RewriteRule ^KB/Article/(.*).htm  http://www.mysite.com/KB/Article/$1 [L]

How Do I do the same thing in nginx? I'm assuming I add the redirect to my
File, as that the one the test site is using;

# Default server configuration

server {
      listen 80 default_server;
      listen [::]:80 default_server;

# Set The Root Directory for the Entire Website

      root /var/www/html/;

# Add index.php to the list if you are using PHP

      index index.html index.htm index.nginx-debian.html;

# Add The Server IP Address or FQDN


# The following does the WorkPress Rewrites for the permalinks
      location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$args;

# pass PHP scripts to FastCGI server

       location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_param …
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0*               LISTEN      1/systemd
tcp        0      0  *               LISTEN      5308/mongod
tcp        0      0   *               LISTEN      652/sshd
tcp        0      0 localhost:smtp*               LISTEN      907/master
tcp        0      0 localhost:32000*               LISTEN      2418/java
tcp        0      0 localhost:27017*               LISTEN      1797/mongod
tcp6       0      0 [::]:monkeycom          [::]:*                  LISTEN      2418/java
tcp6       0      0 [::]:sunrpc             [::]:*                  LISTEN      1/systemd
tcp6       0      0 [::]:webcache           [::]:*                  LISTEN      3387/java
tcp6       0      0 [::]:http               [::]:*                  LISTEN      4534/httpd
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      652/sshd
tcp6       0      0 [::]:ddi-tcp-1          [::]:*                  LISTEN      28290/node
tcp6       0      0 localhost:smtp          [::]:*                  LISTEN      907/master
tcp6       0      0 [::]:https              [::]:*                  LISTEN      4534/httpd
tcp6       0      0 localhost:mxi           [::]:*                  LISTEN   …
hi all,
if I add mod  pagespeed,  mod expire option is not setting up on network tab.

if I remove pagespeed I can see expire for each extensions are showing properly.

how to fix this issue?

Apache Web Server




Articles & Videos



The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.