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 8249707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:38:08+00:00 2026-06-07T23:38:08+00:00

I have an Zend Application that generate URL like that http://miapp.com/module/controller/action/params/values I want to

  • 0

I have an Zend Application that generate URL like that

http://miapp.com/module/controller/action/params/values

I want to exclude from SSL a certain URL that has a param (print or download)

Actually i have this .htaccess params to redirect ALL request over SSL and generate Dynamic URL rewrite

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-s     
RewriteCond %{REQUEST_FILENAME} !-l     
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /index.php [NC,L]
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off

But how can i exclude the URLS that’s contain print or download?

y try something like that 🙁 but i got redirect looping error

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_REFERER} !^https(.*)/(print|download)(.*)$ [NC]
RewriteCond %{REQUEST_URI} !^(.*)/(print|download)(.*)$ [NC]
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
RewriteCond %{REQUEST_FILENAME} !-s     
RewriteCond %{REQUEST_FILENAME} !-l     
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /index.php [NC,L]
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
  • 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-06-07T23:38:09+00:00Added an answer on June 7, 2026 at 11:38 pm

    There is usually as misconception about rewrite rules in that they are done inside the web server. This is true as long as there are no redirects involved in the rewrite rules. A redirect returns a redirect with a new URL and STATUS CODE 3xx to the browser.

    With your second htaccess you have two redirects. Your first rule tells the browser “Dude, use SSL. Try again”. If the request is not HTTPS the connection is terminated after a 301 status code is returned with the new URL to the client. No more lines are processed in the htaccess file. The browser has to send a new request to the server.

    Here’s a bonus if your first sentence is correct and you create URLs in Zend Framework without https. If you do that you are basically generating a whole lot of traffic because each and every request with your links is 301 redirected, i.e. returned and resend by a browser. You should create your URLs in Zend with https to avoid that.

    Now about your second rule. This rule tells the browser “Dude, your path contains print or download you don’t need HTTPS. Try again.” As above the connection is now terminated and no more lines are processed in the htaccess file. Of course, this new request will bang its head on your first rule which will end in your mentioned loop.

    Now all you really need is this, I believe (I can’t test it). You include the print|download as an exception into your HTTPS condition.

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_REFERER} !^https(.*)/(print|download)(.*)$ [NC]
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
    

    In your Zend Application you will have to make sure that your link is only HTTP, though. Not for the rewrite rules to work but your IE requests.

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

Sidebar

Related Questions

currently I have an Zend application on default location www.example.com/{controller}/{action} but when a user
I have an Zend–based application that uses long polling. Basically it makes a HTTP
We have a Zend application that has these following modules: Users Shop etc... Front
I ran across an interesting issue today. We have an application that utilizes Zend
I have a plugin in my Zend Framework application that checks login status after
I have a Zend Framework application that is making use of jQuery UI. In
I have a Zend Framework (PHP) web application that has a table with a
I have a PHP application that is written with Zend Framework. It uses Phing
I'm building an application that's self-hosted, and I'd like to have some form of
I have a working zend mvc application that is using a layout, and this

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.