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? 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. 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] Link to comment https://forums.phpfreaks.com/topic/212446-mod_rewrite/#findComment-1107022 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.