Question

I've now used rewrite to achieve part of my goal:

rewriteengine on
rewritebase /
rewriterule ^([a-zA-Z][a-zA-Z0-9]*)$ resume.php?user=$1

How to add the 404 part?

Was it helpful?

Solution

You could just use ErrorDocument rather than mod_rewrite:

ErrorDocument 404 /yourUrl.html

OTHER TIPS

You can use the Apache ErrorDocument directive to direct 404s to a particular URI.

For example:

ErrorDocument 404 /resume.php
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top