0

I'm using PHP Zend as my project framework. How I can remove public from this URL?

I want this kind of URL

http://staging.revivalx.com/zeesbio/login

Instead of this

http://staging.revivalx.com/zeesbio/public/login

http://staging.revivalx.com/zeesbio/public/login

Thanks a lot in advance.

5
  • possible duplicate of How to remove "public" from url using routeing in zend framework Commented Dec 24, 2013 at 6:01
  • Than try with a htaccess rule as mention here. Commented Dec 24, 2013 at 6:05
  • Zf1 or Zf2? Both have a routing system you can use to match the url to a controller/action. Commented Dec 24, 2013 at 6:44
  • I'm using the old one, ZF1. Commented Dec 26, 2013 at 3:23
  • Check this post stackoverflow.com/questions/9834328/… Commented Oct 19, 2016 at 13:29

1 Answer 1

0

Try to put .htaccess file in your root directory.

RewriteEngine On
RewriteRule ^\.htaccess$ - [F]

RewriteCond %{REQUEST_URI} =''
RewriteRule ^.*$ /public/index.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]

RewriteRule ^public/.*$ /public/index.php [NC,L]

php_value memory_limit 64M

#add content type header 
AddDefaultCharset UTF-8
Sign up to request clarification or add additional context in comments.

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.