There have been always a requirement from the webmasters to redirect the user to a certain page from a particular folder at server level.
- Certainly when some folders of the website are no more in use.
- Infact created a new website in which some old website folders does not exist.
Now what to do?
- Simple create a new file and name it as “.htaccess” file
- Copy this file to the root directory of your website
- Place the following block of code in “.htaccess” file
RewriteEngine on
Redirect /SubFolderName/ /index.php
You are done. Please note that “.htaccess” file is supported by only Apache server.
For IIS server additional configuration is required to be done in IIS or need to install commercial available software which supports “.htaccess” file.
I love the valuable info you provide in your posts. I’ll bookmark your blog and check again here frequently. I’m fairly positive I’ll learn plenty of new stuff right here!