Set up SSL/HTTPS in zend application via .htaccess
Posted
by davykiash
on Server Fault
See other posts from Server Fault
or by davykiash
Published on 2010-05-01T06:52:06Z
Indexed on
2010/05/01
6:59 UTC
Read the original article
Hit count: 335
I have been battling with .htaccess rules to get my SSL setup working right for the past few days.I get a requested URL not found error whenever I try access any requests that does not do through the index controller.
For example this URL would work fine if I enter the it manually
https://www.example.com/index.php/auth/register
However my application has been built in such a way that the url should be this
https://www.example.com/auth/register
and that gives the requested URL not found error
My other URLs such as
https://www.example.com/index/faq
https://www.example.com/index/blog
https://www.example.com/index/terms
work just fine.
What rule do I need to write in my htaccess to get the URL
https://www.example.com/auth/register
working?
My htaccess file looks like this
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
I posted an almost similar question in stackoverflow
© Server Fault or respective owner