Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Install apache with mod_rewrite configuration  (Read 1031 times)

0 Members and 1 Guest are viewing this topic.

jibinw

  • Guest
Install apache with mod_rewrite configuration
« on: July 14, 2018, 11:21:04 am »
This module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule to provide a really flexible and powerful URL manipulation mechanism. The URL manipulations can depend on various tests, for instance server variables, environment variables, HTTP headers, time stamps and even external database lookups in various formats can be used to achieve a really granular URL matching.

Download  the  tarball  source   from  the  apache  website

Now extract the archive using the command:

Code: [Select]
tar -xvfz  httpd-2.3.8.tar.gz
Change the directory to the extracted directory

Code: [Select]
cd  httpd-2.3.8
Now compile

Code: [Select]
./configure --prefix=${PWD} --enable-rewrite=shared
make
make install

After this check the folowing configuration in
Code: [Select]
Httpd.conf . if it doesnt exit, please add it :
Code: [Select]
RewriteEngine On
RewriteCond %{QUERY_STRING} ^wsdl$
RewriteRule ^(.*)$ $1.wsdl [PT]

After this restart apache :

Code: [Select]
/etc/init.d/httpd  restart
in debian or ubuntu

Code: [Select]
/etc/init.d/apache2  restart