have a domain called;
xyz.com (fake name)
and that website a some mod_rewrite directives in the .htaccess to strip out the .php extension. So if I have a file called test.php the url would be;
[
xyz.com...]
The code to do that resides in the .htaccess file. The code is below;
# remove .php; use THE_REQUEST to prevent infinite loops
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.php\ HTTP
RewriteRule (.*)\.php$ $1 [R=301]
# remove index
RewriteRule (.*)/index$ $1/ [R=301]
# remove slash if not directory
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*)/ $1 [R=301]
# add .php to access file, but don't redirect
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
And this works great..
Now I want to add the ability to add the following type of URL.
The displayed url would be;
[
xyz.com...]
The non rewritten string is;
[
xyz.com...]
I tried this rule but it just get server 500 error.
RewriteRule ^article/([^/]*)\.htm$ /articles.php?article=$1 [L]
But this generates an error 500.
Any help with this would be appreciated.
Thanks,
Jeff