Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 383621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:18:02+00:00 2026-05-12T15:18:02+00:00

I am building an app in Zend Framework at the moment and testing it

  • 0

I am building an app in Zend Framework at the moment and testing it all locally. I have Mamp Pro as my web server and I have a self-signed SSL which all seems to work. My problem comes when I try to do mod_rewrite – I just get 404 pages.

The way I have things set up (which may not be the best way…)


In Mamp I have 2 virtualhosts set up both pointing to the same web directory (webroot/public/):

  • secure.myapp.com
  • myapp.com

In my public directory is my index.php file and my .htaccess file. The contents of the .htaccess file are:

SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

When I visit http://myapp.com everything routes as it should using the mod_rewrite. But when I go to https://secure.myapp.com the index page is fine, but URL routing stops working and it appears to be that the .htaccess file is being ignored.

In my ssl.conf I have the following:

<IfModule mod_ssl.c>

Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog  builtin
SSLSessionCache         dbm:/Applications/MAMP/logs/ssl_scache
SSLSessionCacheTimeout  300
SSLMutex  file:/Applications/MAMP/logs/ssl_mutex

<VirtualHost _default_:443>

SSLEngine on
DocumentRoot "/webroot/public"
ServerName secure.myapp.com
ServerAdmin you@example.com
ErrorLog /Applications/MAMP/logs/ssl_error_log
TransferLog /Applications/MAMP/logs/ssl_access_log

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /Applications/MAMP/conf/apache/ssl_cert/server.crt
SSLCertificateKeyFile /Applications/MAMP/conf/apache/ssl_key/server.key

CustomLog /Applications/MAMP/logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

</IfModule>

Does anybody have any ideas on this? I’ll be sooooo appreciative of the help as it’s seriously hindering my development!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:18:02+00:00Added an answer on May 12, 2026 at 3:18 pm

    Well I’m pretty sure that I have got this working. Basically, a big problem I had is that Mamp does not store vhosts.conf as an accessible file. Instead this is an aliased application file.

    I think what happens is that the virtualhosts are all dynamically created all on the standard http port, in my case 80. However I needed to be able to access the port 433 vhost config to enable FileInfo. So my workaround is to ditch my .htaccess file and stick the following ALL into my ssl.conf file.

    <IfModule mod_ssl.c>
    
    Listen 443
    AddType application/x-x509-ca-cert .crt
    AddType application/x-pkcs7-crl    .crl
    SSLPassPhraseDialog  builtin
    SSLSessionCache         dbm:/Applications/MAMP/logs/ssl_scache
    SSLSessionCacheTimeout  300
    SSLMutex  file:/Applications/MAMP/logs/ssl_mutex
    
    <VirtualHost mysite.com:443>
    
        SSLEngine on
        DocumentRoot /webroot/secure
        ServerName mysite.com
        ServerAdmin you@example.com
        ErrorLog /Applications/MAMP/logs/ssl_error_log
        TransferLog /Applications/MAMP/logs/ssl_access_log
    
        SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
        SSLCertificateFile /Applications/MAMP/conf/apache/ssl_cert/server.crt
        SSLCertificateKeyFile /Applications/MAMP/conf/apache/ssl_key/server.key
    
        CustomLog /Applications/MAMP/logs/ssl_request_log \
                  "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    
        DirectoryIndex index.php
    
            <IfModule mod_rewrite.c>
                RewriteEngine on
                RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -s [OR]
                RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -l [OR]
                RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
    
                RewriteRule ^.*$ - [NC,L]
                RewriteRule ^.*$ /index.php [NC,L]
    
                RewriteLog /Applications/MAMP/logs/ssl_rewrite_log
                RewriteLogLevel 3
            </IfModule>
    
    </VirtualHost>
    
    </IfModule>
    

    I had to add DOCUMENT_ROOT in front of my file and directory checks, and a forward slash in front of index.php. If I could have put this into a “Directory” then I think I could have avoided these changes, but Apache won’t restart when I add this parameter.

    The only thing I didn’t try was adding the info to MAMP’s httpd.conf, but I have a feeling the same restrictions may be in place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an app that authors would (hopefully) use to help them, uh.. author
We're building an app that stores hours of operation for various businesses. What is
I am building an app that talks to an Access database via OleDB/Jet. There
I'm building an app in Ruby on Rails, and I'm including 3 of my
So I'm building an app that uses win32's SendMessage as IPC. I'm using FindWindow
I'm building a app that need manage money datatype. I'm new on Obj-c, so
I'm building an app that pulls data in from an excel .csv file and
I'm building an app in PHP and I'm using the data mapper pattern for
I'm building a app that needs to perform calculations on money. I wonder how
I'm building an Android app and I want to copy the text value of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.