Htaccess File Inside The Folder
How to use .htaccess file inside the folder. I'm using two .htaccess files in my hosting, one for labs.abc and another for touch.abc. Just take a look at this post how I had implemented. (domain: abc.com)
Original URL : http://www.abc.info/touch/index.php?id=gilltech
to
Friendly URL : http://touch.abc.info/gilltech
First .htaccess file
This code redirects sub domain http://touch.abc.info pointing to touch folder.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^touch\.abc\.info$
RewriteCond %{REQUEST_URI} !^/touch/
RewriteRule (.*) /touch/$1
Second .htaccess file
This file inside the touch directory. Contains single parameter URL rewriting code.
RewriteEngine On
RewriteBase /touch/
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?id=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?id=$1