I want to redirect a url in my lcalhost ,as when user types : mystring.localhost/CI
to localhost/CI/Mycontroller/Myaction/mystring
in codeigniter .its now showing Server not found and says browser Firefox can't find the server at www.mystring.localhost
. How to do this ? Thanks in advance. I have this in my .htaccess
:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mystring\.localhost\CI\
RewriteRule ^(.*)$ http://localhost/CI/Mycontroller/myaction/mystring/$1 [R=301]