Jump to content

mjurmann

Members
  • Posts

    159
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mjurmann's Achievements

Member

Member (2/5)

0

Reputation

  1. Just in case someone cares: Options +FollowSymLinks RewriteEngine on # Ensure Correct Host RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] # SSL Exception Here RewriteCond %{SERVER_PORT} !^443 RewriteCond %{REQUEST_FILENAME} dvd-order-form.php RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L,S=5] # Redirect all other pages to Non-SSL RewriteCond %{SERVER_PORT} !^80$ RewriteCond %{REQUEST_FILENAME} !dvd-order-form.php ## Specify file types to ignore with rewrite RewriteCond %{REQUEST_URI} !(js|css) RewriteRule .? http://www.domain.com%{REQUEST_URI} [L,R=301] # Redirect SSL Bots to SSL Robots.txt RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^robots.txt$ robots_ssl.txt
  2. Alright, so this seems to be working, sort of: Options +FollowSymLinks RewriteEngine on # Ensure Correct Host RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] # Not Anywhere Else RewriteCond %{SERVER_PORT} !^80$ RewriteCond %{REQUEST_FILENAME} !dvd-order-form.php RewriteRule .* http://www.domain.com%{REQUEST_URI} [QSA,R=301,L] # SSL Exception Here RewriteCond %{SERVER_PORT} !^443 RewriteCond %{REQUEST_FILENAME} dvd-order-form.php RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] # Redirect SSL Bots to SSL Robots.txt RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^robots.txt$ robots_ssl.txt The only problem is that on the dvd-order-form.php page, the images within the images/ folder are pulling the http versions, rather than the https. This is causing the browser to display a warning prompt that there is both secure and insecure data. How can I redirect the images folder to pull the https versions of the images (only on the dvd-order-form.php page)? Thanks in advance.
  3. Hello. We have a single page that needs to be rewritten to https, and the rest of the pages need to be http. So, if someone visits the https page and clicks on another link, the link will automatically be https. mod_rewrite needs to be able to accomplish two things: 1) Rewrite the secure.php page to https 2) If the website is in https, then the other pages needs to be rewritten to http. Here is what I've got so far. # Ensure Correct Host RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] # SSL Exception Here RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^pay-invoice https://%{HTTP_HOST}/pay-invoice [R,L] # Not Anywhere Else RewriteCond %{SERVER_PORT} !^80$ RewriteCond %{HTTP_REFERER} (pay-invoice)$ [NC] RewriteRule .? http://www.domain.com%{REQUEST_URI} [L,R=301] Unfortunately, this is basically causing an infinite loop. Does anyone have any suggestions? Thanks in advance.
  4. We're using the Drupal CMS, so unfortunately, that change does not work either.
  5. https://www.domain.com/pay-invoice/80 However, when I changed: # Not Anywhere Else RewriteCond %{SERVER_PORT} !^80$ RewriteRule .? http://www.domain.com%{REQUEST_URI}/%{SERVER_PORT} [L,R=301] and refreshed the https://www.domain.com/pay-invoice page, it returned, http://www.domain.com/pay-invoice/443
  6. https://www.domain.com/pay-invoice/80
  7. Unfortunately, this is still giving us an infinite loop on the pay-invoice page only. # Ensure Correct Host RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] # SSL Exception Here RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^pay-invoice https://%{HTTP_HOST}/pay-invoice [R,L] # Not Anywhere Else RewriteCond %{SERVER_PORT} !^80$ RewriteCond %{REQUEST_URI} !^pay-invoice RewriteRule .? http://www.domain.com%{REQUEST_URI} [L,R=301]
  8. Here is what I currently have: # Ensure Correct Host RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] # SSL Exception Here RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^pay-invoice https://%{HTTP_HOST}/pay-invoice [R,L] # Not Anywhere Else RewriteCond %{SERVER_PORT} !^80$ RewriteCond %{REQUEST_URI} !^pay-invoice$ RewriteRule .? http://www.domain.com%{REQUEST_URI} [L,R=301]
  9. I copied and pasted that exact code and substituted the domain, however, there is still an infinite loop.
  10. No problem. Is this even possible?
  11. Thanks for your help, however, when I remove that block, mod_rewrite no longer knows to forward the http to the https version of the pay-invoice page. Foxtrot - thanks for your help, but that didn't work.
  12. Does anyone have any ideas here? This infinite loop is a real pain.
  13. Hello. I need to redirect all https requests to http, however, I need to make one exception for a single page on the site. All of the pages redirect from https to http correctly, however, when the exception page is loaded, there is a "Redirect Loop" error displayed. Can someone please tell me where I'm going wrong? Thanks. # Ensure Correct Host RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule (.*) http://www.domain.com/$1 [R=301] # SSL Exception Here RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^pay-invoice https://%{HTTP_HOST}/pay-invoice [R,L] # Not Anywhere Else RewriteCond %{SERVER_PORT} !^80$ RewriteCond %{REQUEST_URI} !^pay-invoice RewriteRule .? http://www.domain.com%{REQUEST_URI} [R,L]
  14. After doing some additional debugging, this is what I have so far. Please, if anyone knows why this is happening, let me know. When I apply the same background color to the "a" and "a:hover" of the links, the layout does not jump on rollover. However, when I apply a different background color from the "a" to the "a:hover", the layout jumps. Why would changing the background color of a link cause the page to jump? What the?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.