I have been searching on the Internet for quite awhile now and I can't seem to find a working htaccess for my website. I am using a news CMS called CuteNews and they have a function that allows for URL rewrites. However, the URL rewrites caused the news pages to become .html as compared to all my other content pages which ends with a .php.
Instead of forcing the .html to .php or vice versa, I intend to remove both the .php and .html extension from the URL. However it can't work despite me putting a few different htaccess that other people had shown in the Internet.
Now, I am really a complete newbie at htaccess because I only have a very limited knowledge about it.
This is the .htaccess that CuteNews generates once I activate the URL rewrite functions,
# --- CUTENEWS[ST] RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /cms/show_news.php?cn_rewrite_url=$1 [L] # --- CUTENEWS[ED] Can anyone guide me along or something on removing the .html generated by this .htaccess as well as to remove the .php from my other content pages? Thanks.
.htaccessRewriteRules don't remove the extensions from your code at all. They just make it so extension-less URLs work too. Your code needs to handle the extensions.%{REQUEST_FILENAME}yet