0

I am bulding a website with zend framework 2 and a URL typically looks like this: domain.com/public/routename/action/params

In the skeleton application i don't have index.php by default, so i created one what basically includes the index.php from the public folder.(This is absolutely not the correct solution). What works but slows down the whole website, also the redirect plugin still redirects to domain.com/public/routename/action/params insetad of domain.com/routename/action/params

How could i skip the "public" in the URLs and get the redirect plugin to work?

1
  • Can you not change your document root to point at the public folder instead (which is the correct way to set it up)? Commented Feb 14, 2016 at 14:49

2 Answers 2

1

Either you can do this from webserver from where you can point the public folder index.php so either point the domain to zf2 you should point to zf2/public/index.php

Another way is you can use htaccess and remove the public url

Sign up to request clarification or add additional context in comments.

Comments

0

You should configure your web server so that it serves from public instead of the ZF2 root folder.

Not sure if you use IIS or apache or NGiNX, so without those details it is hard to say what you need to do exactly. But it should be easy to find a 'how to' for your particular web server.

It comes down to configuring what folder should be server for that particular virtual host.

Google can help you

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.