I have an interesting .htaccess config on my ROOT that looks like this:
RewriteEngine On # add a trailing slash if portal-pages/$1 is a directory RewriteCond %{DOCUMENT_ROOT}/portal-pages/$1 -d RewriteRule ^(.*[^/])$ %{REQUEST_URI}/ [L,R=301,NE] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(?!portal-pages/)(.*)$ portal-pages/$1 [L,NC]
So my real path would be something like this:
local.com/portal-pages/home
but the .htaccess translates this path to this:
local.com/home
it works great, but if I hit local.com I want it to forward to local.com/home. if I hit local.com/whatever that just goes to /whatever.
How can I do this with this configuration? Thanks in advance.
also, how can I force everything to https?
$1
meant to be? – arkaschaif I hit local.com I want it to ONLY redirect to local.com/home if I hit local.com/whatever that just goes to /whatever.
statement? – anubhava