Solved

Mod Rewrite: .xyz to 404

Posted on 2008-10-21
1
233 Views
Last Modified: 2012-05-05
I want to rewrite all pages with a .xyz extention to /404/index.htm

So:
http://www.example.com/sub/dir/page.xyz

Should be redirected to:
http://www.example.com/404/index.htm



0
Comment
Question by:hankknight
1 Comment
 
LVL 27

Accepted Solution

by:
caterham_www earned 500 total points
ID: 22771861
For a redirect add the R flag ([R,L]], but in all cases, a http status code 200 would be issued but not 404 not found.
RewriteEngine on
RewriteRule \.xyz$ /404/index.htm [L]

Open in new window

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
Employ management and Helpdesk software 4 42
XAMPP 3 60
Apache,  not running php on top level 14 65
Apache Issues 9 80
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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