.htaccess
How to restrict users from accessing files & directory level(Protect directory) using .htaccess
Today i faced a situation where i have to restrict or deny users from accessing files and folders of my web application directly by entering URL in browser which contain very important contents like images,pdfs,docs,etc. For this what i need to do is to protect the files and folders(directory) which contains images,pdfs and docs. We can restrict users from accessing files,folders and subfolders by using .htaccess(Hyper Text Files).
How to remove index.php from url using .htaccess (mod_rewrite)
For better SEO optimization and make urls more search engine friendly , remove index.php from URL and make it easier to read. This can be done by writing only two lines in your .htaccess(mod_rewrite in apache) file. Before writing this rule in .htaccess , make sure that your mod_rewrite is enabled(On) in your apache server.
How to redirect www to non-www and non-www to www URL using .htaccess redirect(mod_rewrite)
Websites can be access with www and without www also. Since Search engines consider http://www.programmingfacts.com and http://programmingfacts.com different websites. It might be a case of duplicate content. So you must stick your domain name accessible either with www or without www.


I am
Recent Comments