thank you all for your answers. It is not making more sense to me
unfortunately. The thing is I am not so keen just to copy something
and hope it works. I am trying to understand what is wrong with my
code.
Here is my code with explanations:
## basic stuff
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>
## basic stuff
RewriteEngine On
RewriteBase /
## ----------- start error prone part
## if HTTPS is ON
#RewriteCond %{HTTPS} on
## rewrite to normal site
#RewriteRule !^search-results/view/(.*) http://%{HTTP_HOST}%{REQUEST_URI}
[R=301,NC,L]
## ----------- end error prone part
## if HTTPS is OFF
RewriteCond %{HTTPS} off
## and URL starts wtih search-results/view then rewrite to HTTPS with
special port
RewriteRule ^search-results/view/(.*) https://%{HTTP_HOST}:20445%{REQUEST_URI}
[R=301,NC,L]
## I always use the stuff below for my CMS, should work fine!
## however, I am adding it here as one could influence the other
RewriteCond %{REQUEST_URI} !(\.gif)|(\.html)|(\.jpg)|(\.png)|(\.css)|
(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---