0
I have the following problem: Dude. htaccess defines my URL rewriting that works perfectly when accessed by http but when accessed by https it informs that the page has not been found. Below is my . htaccess.
AddDefaultCharset UTF-8
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/?$ index.php?area=$1 [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?area=$1&sub=$2 [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ index.php?area=$1&sub=$2&subitem=$3 [L]
Has anyone ever been there? Do you have any idea what it might be?
I think it might help you: http://stackoverflow.com/questions/4398951/force-ssl-https-using-htaccess-and-mod-rewrite there’s an example of rewriting with https
– Rafael Withoeft
That’s not quite what I’m looking for @Rafaelwithoeft . My rewrite has to work for both protocols, the problem is it’s only working for.
– Fábio Pinho
Fabio try to take a look at this then: http://www.askapache.com/htaccess/http-https-rewriterule-redirect.html in the part where it says
New HTTPS to HTTP Redirection ^
It gives you the option to use the 2;– Rafael Withoeft
@Rafaelwithoeft thanks so much for the help, htaccess was correct, the error was in apache configuration.
– Fábio Pinho
Perfect, glad you found the solution.
– Rafael Withoeft