Jump to content

how to include subdirectory?


sayedsohail

Recommended Posts

I'm not an apache expert, but if you have htdocs/xyz/ as your document root then you will simply access /abc/ by adding it to your address?

 

domain.com/abc/file.ext

 

Maybe a more detailed description of your problem would be good... :)

Link to comment
Share on other sites

well, i can access the file if type the complete url:

 

xyz is my parent folder and abc is the sub folder for xyz

 

my index.php file is inside the xyz and if i typed http://localhost/xyz/index.php it works fine

 

my search.php file is stored inside the sub folder abc, i wish to call search.php file without typing the full url address.

 

i.e, http://localhost/xyz/search.php  instead of http://localhost/xyz/abc/search.php

 

 

Link to comment
Share on other sites

yes, i tried this but it doesn't work for me either.

 

created a .htaccess file and added this code.

 

 

Code:

 

IndexIgnore */*

<Files .htaccess>

order allow,deny

deny from all

</Files>

 

RewriteEngine On

RewriteRule ^(.*)/localhost/xyz/search.php$ $1/localhost/xyz/abc/search.php

 

 

 

but still it doesn't work?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.