I'm trying to setup the following rule:
RewriteRule ^(?=health-safety/.*)([^/\.]+)/开发者_开发技巧?$ course-list.php?id=1 [L]
so if somebody enters /health-safety
it will redirect to course-list.php?id=1
I have other rules going on, so it needs to detect if it's for health-safety.
If they will be entering www.yoursite.com/health-safety/, this rule should work:
RewriteRule ^health-safety/?$ course-list.php?id=1 [L]
If there will be an additional path, you may need this rule:
RewriteRule ^health-safety/([^/\.]+)/?$ course-list.php?id=$1 [L]
In the second example www.yoursite.com/health-safety/5 would display www.yoursite.com/course-list.php?id=5
精彩评论