atholon Posted July 30, 2011 Share Posted July 30, 2011 I've just started looking into Zend Framework and glancing at the quickstart on their website I saw they used a virtual host to redirect to the public directory. What are you supposed to do if you only have access to .htaccess on a shared host? I don't know much about mod_rewrite or any of that. I just want to send the traffic to that folder. Quote Link to comment https://forums.phpfreaks.com/topic/243318-zend-rewrite-base/ Share on other sites More sharing options...
trq Posted July 31, 2011 Share Posted July 31, 2011 mod_rewrite rules can also go in a .htaccess file. Quote Link to comment https://forums.phpfreaks.com/topic/243318-zend-rewrite-base/#findComment-1249613 Share on other sites More sharing options...
atholon Posted July 31, 2011 Author Share Posted July 31, 2011 I guess I was wondering if there was a generic rule for that? Quote Link to comment https://forums.phpfreaks.com/topic/243318-zend-rewrite-base/#findComment-1249628 Share on other sites More sharing options...
trq Posted July 31, 2011 Share Posted July 31, 2011 It's not exactly clear what you want to do, your .htaccess file needs to be in your public directory. For Zend, you need to direct all traffic (excepting images and css) to your index.php file. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php Quote Link to comment https://forums.phpfreaks.com/topic/243318-zend-rewrite-base/#findComment-1249636 Share on other sites More sharing options...
atholon Posted July 31, 2011 Author Share Posted July 31, 2011 Let me explain it better sometimes I am bad at making assumptions. I have a project I just created. I am not sure if I am going to have access to httpd config to do the virtual host stuff that they recommend in Zend's quickstart so I am trying to figure out how to do it with .htaccess. My project resides in a directory like /www/Leadership, I want to send everything to Zend's public folder in my project when they hit the Leadership directory. Maybe I am going about that the wrong way? Quote Link to comment https://forums.phpfreaks.com/topic/243318-zend-rewrite-base/#findComment-1249638 Share on other sites More sharing options...
trq Posted July 31, 2011 Share Posted July 31, 2011 Take a look at this: http://framework.zend.com/wiki/display/PLAY/Base+URL+and+subdirectories Quote Link to comment https://forums.phpfreaks.com/topic/243318-zend-rewrite-base/#findComment-1249650 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.