I'm creating Web addresses during my website as

http://example.com/register/

http://example.com/login/

I'm creating above Web addresses by writing following rules in htaccess

RewriteRule register/ /register.php

RewriteRule login/ /login.php

Now its working acceptable for me, but when I create my Web addresses by creating seprate folder for /login/index.php and /register/index.php By creating folders and index.php files inside individuals I'm able to achieve above functionality easily.

But I wish to know which w=you will be faster, I attempted both techniques although not seen much difference, based on logic and apache specifications and everything which method is going to be faster along with a good method to choose.

My pal states .htaccess rules is going to be reduced, because just in case of htaccess first it'll look for rules after which it'll redirect towards the corresponding attached page, this method will require time than folder organization.

I understand that .htaccess will a minimum of be simpler for development/debugging reasons because:

1) Because all your files come in exactly the same directory rather than their individual ones. 2) Since your editor can have the particular filenames rather than multiple index.php.

Also, since you are using .htaccess, this causes it to be simpler to place a guide such as:

RewriteRule ^getdata/(\d+)/$ getdata.php?page=$1

That you simply can't do while using the directory-based techniques.

Overall, the rate difference is minimal in comparison towards the benefits offered by using mod_rewrite.

.htaccess is going to be reduced, however the time difference is going to be minimal.

You need to focus on other activities - like which is simpler to keep.