Solved

Mod Rewrite: .xyz to 404

Posted on 2008-10-21
1
232 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apache HTTP to HTTPS redirect please. 5 45
Application launch issue with Apache Tomcat 5 22
CentOS 7 (Apache2) Cannot Install SSL Cert 1 51
Best IDE for PHP starters 11 113
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…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now