Forum Moderators: phranque
RewriteEngine on
Options +FollowSymlinks
RewriteRule ^(.*)article/(.*)$ $1/index.php?mode=article&id=$2
RewriteRule ^(.*)abc/(.*)$ $1index.php?mode=$2
ErrorDocument 404 /abc/page_not_found ErrorDocument 404 /abc/index.php?mode=page_not_found and you MUST make sure that the script sends the correct "HTTP/1.1 404 Not Found" HTTP status code as the very first thing that it outputs. RewriteRule ^(.*)article/(.*)/(.*)/(.*)$ $1/index.php?mode=article§ion=$2&subsection=$3&id=$4 RewriteRule ^[^-]+article/[^-]+/([^-]+/[^-]+$ $1/index.php?mode=article§ion=$2&subsection=$3&id=$4[L]