tallberg Posted September 3, 2010 Share Posted September 3, 2010 Hi im using mod rewrite to change .htm to .php RewriteRule ^(.*)\.htm $1\.php [NC] Works fine but occationally it acctually sends back a filename.php to the url instead of .htm Any one have a clue? Quote Link to comment https://forums.phpfreaks.com/topic/212446-mod_rewrite/ Share on other sites More sharing options...
cags Posted September 3, 2010 Share Posted September 3, 2010 I don't really understand what you are saying. The code you have doesn't perform a redirect, meaning it's impossible upon request of an .htm file for a .php address to be visible on the clients PC. If somewhere on your site there is a link to a .php file though, that will display in the address bar as .php so you need to fix the link. Quote Link to comment https://forums.phpfreaks.com/topic/212446-mod_rewrite/#findComment-1106882 Share on other sites More sharing options...
PradeepKr Posted September 3, 2010 Share Posted September 3, 2010 Probably you need this RewriteRule ^(.*)\.html?$ $1.php [NC] Quote Link to comment https://forums.phpfreaks.com/topic/212446-mod_rewrite/#findComment-1107022 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.