include virtual folder in htaccess file

Problems with the Windows version of XAMPP, questions, comments, and anything related.

include virtual folder in htaccess file

Postby vn412 » 27. December 2011 11:41

Hi,
I have a problem with htaccess file. My code include folder names that are dynamic.
e.g
http://www.domain.com/username/details
Now I have a folder "details" which is common. I want my url to be same as written above
But how should i write the code for the virtual folder "username" so that code of the details folder get executed.
I can't write each username folder as they are dynamic.
I hope i put my query clear. Any help would be highly appreciated.

Thanks in advance
vn412
 
Posts: 1
Joined: 27. December 2011 10:55
Operating System: xp

Re: include virtual folder in htaccess file

Postby JonB » 27. December 2011 15:38

virtual folder "username"


why is "username" a 'virtual' folder?

and how is "details" 'common' (which would normally mean it only has a single instance).

This is not a 'XAMPP' issue, but I will set you off in the right direction -

First - "when is a .htaccess directive acted upon"?
http://httpd.apache.org/docs/current/ho ... ccess.html

Therefore - You must have already set the 'username' in some global fashion - before your proposed URL redirection can occur.

Second - is there a provision in Apache for 'user directories' (note this applies to 'real' folders) This is the function of mod_userdir
http://httpd.apache.org/docs/current/mo ... ml#userdir

Third - "Can Apache point to a 'single instance object, outside its native context?" That is the realm of the 'Alias' directive.

http://httpd.apache.org/docs/current/mo ... html#alias

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 196 guests