My old website doesn't use a framework and the .htaccess worked fine, take a look at my .htaccess code below:
RewriteRule ^([a-zA-Z0-9_-]+)\.html solution.php?solution=$1 [L]
So the point there is that if it detects '.html' in the url, then the user is redirected to a PHP page passing any GET parameter.
Recently, I have converted my website to use the code igniter framework, so I have converted my .htaccess code to something below:
RewriteRule ^([a-zA-Z0-9_-]+)\.html index.php/solution/index/$1 [L]
I end up getting a page not found. However, if I still manually type
http://myhost/index.php/solution/index/xxx
then it works, but if I type
http://myhost/xxx.html
then it doesn't. My objective here is to maintain the original URL because it is indexed by Google and I do not want the previous visitors of my website to be getting a 'page not found' for my old links.
I need a fix or suggestion that might help. Looking forward to your response. Thanks.