php


htacess rewrite for AltoRouter to include redirect to https


I'm using Altorouter which requires the following in htacess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
This is working just fine but I also need to redirect http to https. I found examples online but all my efforts to combine the two have failed. How would I combine the top snippet with this?
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://example.com/$1 [R]
Try with below,
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Related Links

Multiple Search Form in one Submit button PHP/HTML
Why does my string sanitizer cause a 403 Access Denied error?
Store activity with dates
issue with a smarty nested foreach loop
How do I create a query with mysql using data from two tables? [closed]
MySQL WHERE multiple columns LIKE '%$sq%' returns empty array [duplicate]
Change data of form field after submit
MongoDB Logging Suspicious Traffic
Magento product page variables
if condition not working with same $variable in php
display the data which contains multiple result
how to get count of another table
Can't replace new line from file
AJAX load structure
How to remove path info?
how to edit built in twig function - extension

Categories

HOME
xpath
powerbi
shinyapps
hid
nsview
website
odata
celery
consul
google-webmaster-tools
hyperledger
visualforce
ui-automation
siesta
heuristics
colors
amazon-emr
smartgwt
bnf
asciimath
string-formatting
coroutine
cpu-usage
maven-surefire-plugin
channel
websphere-portal
quartz.net
ratio
react-dnd
opentext
strophe.js
crud
onchange
ccavenue
monitor
nic
toad
vcenter
cucumber-junit
serversocket
winrm
redgate
nanogallery
best-buy-api
microkernel
export-to-pdf
ejml
nuclio
cloudwatch
nusoap
asp.net-web-api-routing
deedle
stateless-session-bean
sesame
adobe-reader
gapi
elastic4s
researchkit
pjax
mathml
conan
dpkg
android-sdcard
static-methods
deferred-rendering
odp.net-managed
android-async-http
jemdoc
distributed-cache
jsr363
odesk
juniper-network-connect
dbmigrate
nhibernate-criteria
ildasm
adwords-apiv201402
inequality
tabris
boolean-algebra
jomsocial
spring-security-acl
mousemotionlistener
libxml-js
ember-table
objective-c-runtime
microformats
xmlwriter
simplecov
linkbutton
cgrectmake
coordinate
fbml
zend-server-ce
haiku
asp.net-mvc-views
django-pagination
cassini
aggregator
reliability
server-load
levels
parentid

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile