Jump to content

.htacces redirect


Recommended Posts

I want to make all urls go to:

 

https://www.domain.com/page/var1/var2/ etc. (with all to https and all with trailing slash).

 

Also, I want index.php to receive all requests, despite the url being /page/variable/variable2 etc.

 

I have this, but none of it works. I must be doing something wrong.

 

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^domain.com  
RewriteRule (.*) http://www.domain.com/$1 [R=301,L] 

RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]	

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L,NS]

Link to comment
https://forums.phpfreaks.com/topic/262779-htacces-redirect/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.