Solved

Apache Rewrite Mod: simple rule doesn't work

Posted on 2013-12-03
1
500 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

Suggested Solutions

Title # Comments Views Activity
Web Site Hosting 10 88
IIS 404 Error on website Automatic Redirect to /help 5 57
DNS, website, godaddy 6 86
Apache Issues 9 82
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
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…

832 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