Need help with redirect rules on htaccess.
I got a Heroku app that has a custom domain. I want to force the custom domain to always use HTTPS and redirect all HTTP requests to HTTPS. Also, my app is a Laravel app so by default, the URL looks like this: [login to view URL] , i want to remove the "public" part so that the URL becomes [login to view URL] (App is located in a subdomain if that matters).
This is my htaccess right now:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/$1 [R=301,L]
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz|svg)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
And it works with the HTTP redirect to HTTPS, but I cant figure out how to point it to /public/ folder.
Thanks
Hi. I am Vojislav, a fully professional and experienced web developer and web designer.
I can make: Websites / eCommerces / Online Stores / WooCommerce / Blogs /
I can easily develop websites in CMS:
Years work in:
5+ WordPress
2+ PrestaShop
2+ Shopify
2+ Magento
1+ Odoo
3+ Drupal
5+ Joomla
5+ PHP Nuke
5+ PHP Fusion
My skills:
5+ PHP
5+ MySQL
5+ HTML
2+ HTML5
5+ CSS
4+ CSS3
4+ Bootstrap
I can easily develop forums:
SMF
vBulletin
phpbb
AEF
Hire me so that I can help you develop a fully functional website.
I can fix this issue for Free. However, I do hope to work with you on future projects related to web development, digital marketing, software application development, managed cloud hosting services and more.