views:

45

answers:

3

I have a server, where I have uploaded my work in zend framework(in a subdomain). the folder name is 'visit'.

So, When I go to: http://mysitename.com/visit, it shows a directory structure:

Parent Directory
application/
docs/
library/
nbproject/
public/
tests/

But when I go to: http://mysitename.com/visit/public, i get the index page of my project.

But I want to get my index page , when I type: http://mysitename.com/visit

can you please give me the correct htaccess it need?

A: 

You can do this with the following rule set, which is in part a partially modified version of the one described in the documentation.

.htaccess file in /visit:

RewriteEngine on

# Guard against people visiting /public/ directly
RewriteCond %{THE_REQUEST} ^[A-Z]\s/visit/public/
RewriteRule ^public/(.*)$ /visit/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
# Make sure we've rewritten to the ./public/ directory already
RewriteCond $0 ^public/
RewriteRule ^.*$ - [NC,L]
# The index file is now at /visit/public/index.php
RewriteRule ^.*$ /visit/public/index.php [NC,L]
Tim Stone
A: 

Does anyone know how to translate this into IIS7 web.config format? I'm having the same issue with the index page content being shown for all pages!!!! Cheers

Kam