Solved

Apache Rewrite Mod: simple rule doesn't work

Posted on 2013-12-03
1
502 Views
Last Modified: 2013-12-03
I have a simple .htaccess:
RewriteEngine on
RewriteRule ^alice.html$ bob.html

Open in new window

Apache 2.2.3 config:
<VirtualHost *:81>
    DocumentRoot /var/www/domain.com
    ServerName domain.com
    ErrorLog logs/domain.com-error_log
    CustomLog logs/domain.com-access_log common
    RewriteEngine On
    RewriteLog logs/rewrite.log
    RewriteLogLevel 9
</VirtualHost>

Open in new window

http://192.168.10.150:81/bob.html is returned normally, but http://192.168.10.150:81/alice.html doesn't get rewritten and shows a not found error. Why?
Thank you.

Rewrite log:
192.168.10.100 - - [03/Dec/2013:15:06:06 +0600] [192.168.10.150/sid#8f045f0][rid#9824cc0/initial] (2) init rewrite engine with requested uri /alice.html
192.168.10.100 - - [03/Dec/2013:15:06:06 +0600] [192.168.10.150/sid#8f045f0][rid#9824cc0/initial] (1) pass through /alice.html

Open in new window

0
Comment
Question by:PavelTMN
1 Comment
 
LVL 1

Accepted Solution

by:
PavelTMN earned 0 total points
ID: 39692173
I forgot to add AllowOverride all.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question