Mod Rewrite rule help. Just 1 rule.

On a linux server, I need help with a mod_rewrite rule please.

Actual url: phrase here
Desired url:

Thanks, Greg Schipper Phone: 210-493-6193
Who is Participating?
do this:
RewriteEngine on
RewriteCond   %{REQUEST_FILENAME}  !-d
RewriteCond   %{REQUEST_FILENAME}  !-f
RewriteRule ^([^a-z].*).html$                   page.php?str=$1
Try this in a .htaccess file in the /rh/ directory:

RewriteRule ^([a-z_-])\.html$ page.php?str=$1

That should allow keywords that contain lowercase letters, underscores and hyphens, but you can change the pattern to suit you.
gregsschipperAuthor Commented:
Thank you HackneyCab.
This was tried on to servers already performing mod_rewrite, and both give 404 error.
Contents of .htaccess file
RewriteEngine on
RewriteRule ^([a-z_-])\.html$ page.php?str=$1
Any suggestions?
Thanks, Greg Schipper Phone: 210-493-6193
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.