I am trying to write .htacces rewrite rules for blog module.
if => www.xyz.com/index.php It should not redirect anything
if => www.xyz.com/contactus.php It should not redirect anything
but
if => www.xyz.com/blogs/test-string1-and-string2
(URL pattren fixed for blog pages)
It should redirect to blog_details.php?id=$1
I have tried following rules.:
RewriteCond %{HTTP_HOST} !/blog/
RewriteRule blogs/(\w+) blog_details.php?id=$1 [NC]
This is not perfect rule. It is causing problems while generating sitemaps and Seo results.
I want some strong validation for URL like .php at the end of URL or
words separated by hyphen (-) after blog/. Then I can redirect url.