I want to secure a few pages on my site using my SSL certificate. I found the folder where the pages are and there is an .htaccess file in the folder (there are actually several .htaccess files throughout the program folders......is it safe to assume that each .htaccess file handles those pages within that particular folder?) The existing .htaccess file shows the following: <Limit GET POST HEAD> deny from all </Limit> PHP: Should I delete the above code and place in the code below that I found on the internet? RewriteCond %{HTTPS} !=on RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] PHP: I tried this in the .htaccess file I found in the root of my site which did redirect to "https://" however, when I tried clicking on a link on my home page...it just refreshed the page. Any help would be appreciated.
That's ok. A dynamic url looks like: http://example.com/?page=somepage Code (markup): A static url looks like: http://example.com/somepage.html Code (markup): Take care.
Haha, ok, well the {REQUEST_URI} can only post static URLs. So it would get the index.php part, but not the parameter (the part after the question mark), so every page would essentially be an index.php page. Does that make sense? Also, each htaccess file will handle the folder it is in, otherwise it will go to the next highest folder looking for an htaccess file if one exists. Cheers,
Hunter, try this RewriteCond %{HTTPS} !=on RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L] Code (markup):