0
Is it possible to control the url in htaccess? For example: if you type site.com.br it corrects and places www.site.com.br.
I have a case that some pages go with site.com.br/blog. Others with site.com.br/who-we give error, because it sends to https://site.com/index.php.
The htaccess I’m using is this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
(I’m sorry, but I couldn’t find another way to put it here).
I did that and now it’s going to https://www.site.com.br/index.php. I wonder if there’s any more bo?
– Rogério Pancini
Is that your website? Why is the URL right https://www.site.com.br/index.php
– user41210
Can I put the real url? I thought I couldn’t.
– Rogério Pancini
Yes, but it’s best to leave the environment variables alone.
– user41210