How to avoid URL and directory match problem when editing .htaccess file?

Your RewriteCond will work if it is in the correct place. Your full . Htaccess should look like: RewriteEngine On RewriteCond %{REQUEST_FILENAME}!

-d RewriteCond %{REQUEST_FILENAME}! -f # ---------------------------------------------------------------See info below-- RewriteRule ^(a-z{1}a-z0-9_-{3,20})$ account. Php?

Username=$1&%{QUERY_STRING} Also, you don't need the %{QUERY_STRING} Instead you should use the QSA flag to append the rest of the query string RewriteRule ^(a-z{1}a-z0-9_-{3,20})$ account. Php? Username=$1 L,QSA.

Your RewriteCond will work if it is in the correct place. Your full . Htaccess should look like: RewriteEngine On RewriteCond %{REQUEST_FILENAME}!

-d RewriteCond %{REQUEST_FILENAME}! -f # ---------------------------------------------------------------See info below-- RewriteRule ^(a-z{1}a-z0-9_-{3,20})$ account. Php?

Username=$1&%{QUERY_STRING} Also, you don't need the %{QUERY_STRING}. Instead you should use the QSA flag to append the rest of the query string... RewriteRule ^(a-z{1}a-z0-9_-{3,20})$ account. Php?

Username=$1 L,QSA.

Yes, at last my lines in the . Htaccess files look like your code. But the problem is not yet solved.

How to resolve it if I have the same directory and username available? Or are there any better solutions to this problematic situation? – forbdn Jun 17 at 14:08 The first answer to my question did not resolve the issue!

Does anyone know how to prevent the problem? It is in the matching names of directory and account username. The functionality is like the one in facebook - I want to do the same as facebook.Com/johnsmith for example.

I would greatly appreciate your help! – forbdn Jul 5 at 7:19 @forbdn I don't think you'll be able to solve this with .htaccess. Instead, all requests would have to go first to index.

Php to check the database to see if a record exists. If not, PHP would then have to check if the directory exists and redirect there if it does. – Michael Jul 5 at 13:57.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions