Forum Moderators: phranque
[edited by: jdMorgan at 12:47 am (utc) on May 21, 2010]
[edit reason] de-linked, switched to example.com [/edit]
[edited by: jdMorgan at 12:49 am (utc) on May 21, 2010]
[edit reason] switched to example.com and de-linked [/edit]
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTPS} off
RewriteCond %{HTTPS} on
https://www.example.com/$1 [R=301,L] [edited by: jdMorgan at 12:50 am (utc) on May 21, 2010]
[edit reason] example.com [/edit]
https://www.example.com/$1 [R=301,L] http://example.com/shop/checkoutturn into https://www.example.com/shop/checkout/when the purchaser leaves the /shop/cart/ for checkout. [edited by: jdMorgan at 12:51 am (utc) on May 21, 2010]
[edit reason] example.com [/edit]
All I am trying to do is...
Options +FollowSymLinks -Indexes -MultiViews
RewriteEngine on
RewriteBase /
#
# Externally redirect HTTP requests for SSL shop/checkout page to HTTPS
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^shop/checkout/?$ https://www.example.com/shop/checkout [R=301,L]
#
# Externally redirect HTTPS requests for non-SSL pages back to HTTP.
# (Note that shared objects such as images, css, & JS on both HTTP
# and HTTPS pages are excluded from this rule)
RewriteCond %{SERVER_PORT} =443
RewriteCond $1 !^shop/checkout/?$
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
#
# Externally redirect direct client requests for "index.php" in any directory to
# "/" in that same directory, preserving the client-requested http/https protocol
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*index\.php([?#][^\ ]*)?\ HTTP/
RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$
RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.example.com/$1 [R=301,L]
#
# Externally redirect extensionless page requests to remove trailing
# slash, preserving the client-requested http/https protocol
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$
RewriteRule ^(([^/]+/)*[^./]+)/$ http%2://www.example.com/$1 [R=301,L]
#
# Externally redirect all non-blank non-canonical hostnames to the canonical
# hostname, preserving the client-requested http/https protocol
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$
RewriteRule ^(.*)$ http%2://www.example.com/$1 [R=301,L]
#
# BEGIN WordPress
# Internally rewrite all requested URL-paths to the Wordpress script filepath,
# except for previously-rewritten requests for WP's index.php script file,
# object types that are not generated by WP itself, and URLs which resolve to
# physically-existing files or directories.
RewriteCond $1 !^index\.php$
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php [L]
# END WordPress
[edited by: jdMorgan at 6:42 pm (utc) on May 21, 2010]
www.example.com loads, but if I load any other page where I get an error it does not provide any information. www.example.com to load, but if I try any other page on the website like www.example.com/blog or www.example.com/shop or www.example.com/shop/checkout/ I get the error message. www.example.comand it comes right up. When I try to navigate to any other page it won't let me. http://example.com/blog www.example.com/blog [edited by: jdMorgan at 6:36 pm (utc) on May 21, 2010]
[edit reason] snipped data dump,obscred private data [/edit]
Hopefully, the problem isn't because of my fat-fingered typing or poor eyesight... :)
# Externally redirect all non-blank non-canonical hostnames to the canonical
# hostname, preserving the client-requested http/https protocol
RewriteCond %{HTTP_HOST} ^(www\.example\.com)?$
RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$
RewriteRule ^(.*)$ http%2://www.example.com/$1 [R=301,L]
http://example.com/ example.com http://www.example.com/ http://www.example.com/ www.example.com http://example.com/xmlrpc.php http://example.com/ [edited by: jdMorgan at 11:06 pm (utc) on May 21, 2010]
[edit reason] Removed irrelevant data [/edit]