0

I am having a problem setting up my Zend framework project.

I have xampp/htdocs/quickstart

my server name is mydomain.com. I want to access my project at https://mydomain.com/quickstart(note that i am using https, dont think if this could be a problem)

i used the following .htaccess

    RewriteEngine On

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]

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]

And i am getting a 404 error , why does this happen? I am sorry, i am no expert in configuring .htaccess. All i want to do is route all the requests in quickstart to quickstart/public. and to access my zend project at https://mydomain.com/quickstart/

i am getting a 404 error with above .htaccess(found on Internet)

My problem is is i already ahve other apps running on the server and i want to build a project on /quickstart. i also cannot create a subdomain. Can you please help me with proper .htaccess config.

Eswar Rajesh Pinapala
  • 4,841
  • 4
  • 32
  • 40
  • How about creating an alias for "quickstart" to your app's `public` directory? That way you avoid having the `public` directory visible in the URL. See http://stackoverflow.com/questions/7563333/multiple-zend-framework-sites-on-one-server/7563414#7563414 – Phil Sep 28 '11 at 04:27
  • Thanks, that worked for me, but the only problem now is how can I do the same for SSL (:443) ?? – Eswar Rajesh Pinapala Oct 03 '11 at 16:40

1 Answers1

0

Try with this,

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Pablo Morales
  • 687
  • 1
  • 5
  • 15
  • I am sorry , I used this but this, it throws a 500 error! U guess this alone won't work, virtual host alias should also be configured along with this I guess! – Eswar Rajesh Pinapala Oct 03 '11 at 16:42