So if i understood correctly, to be able to have just a part of the site be https without touching the .htaccess file then all pages have to be php. Is this correct?
So if i understood correctly, to be able to have just a part of the site be https without touching the .htaccess file then all pages have to be php. Is this correct?
The best way to learn anything, is to question everything.
WigeDev - Freelance web and software development
On my interior pages, like www.mysite.com/help.html, my website shows an error if the user leaves off the .html (www.mysite.com/help). Is there something I can add to the .htaccess to fix that problem?
It is possible. There are two situations you may encounter: the trailing slash may be omitted, or the file extension may be omitted. You would need to look at your logs and determine which happens more often and correct for that situation, and let the other situation be resolved through custom error pages.
If you want to add a trailing slash / if no file name is specified (domain.com/file becomes domain.com/file/) use the following:
If you want to automatically add the extension .html, on the other hand, you would use the following:Code:RedirectMatch 301 ^/([a-zA-Z0-9/]*)$ http://domain.com/$1/
Code:RedirectMatch 301 ^/([a-zA-Z0-9/]*)$ http://domain.com/$1.html
The best way to learn anything, is to question everything.
WigeDev - Freelance web and software development
Thank you, Wige... although I doubt my Control Panel lets me do that. We host all our clients in GoDaddy. But we've come across something else - a little piece of javascript that you put into the html files that you want to keep as http. Would you mind checking to see that I didn't mess up again? The site is spauno.com. Only the "Reservation" pages and the contact sheets need to be https. What was happening was that when you navigated out of an https page and went to an http page, it would show this last page as also being secure, even if you had previously navigated it in http. This was creating the duplicate content. For some 6 months G wouldn't touch this site not even with a 10 foot pole. I hope this will get my client ranked.
The Javascript you have in use seems to work, however this type of redirection is not generally supported by the search engine spiders. You could run the risk of the https version of the page being indexed or, worse, dropped if the search engines see the Javascript redirection as sneaky/suspicious.
The best way to learn anything, is to question everything.
WigeDev - Freelance web and software development
Thank you so much for your help... and unfortunately you are right about being dropped. Over the weekend G un-indexed all pages except for the php and one html where we forgot to put in the "magic" code. Ouch. Like I said, the site has no htaccess file, goes crazy every time we try to put one in, and the Control Panel does not have an option for singling out pages, or much of an option for controlling anything really. Would you suggest we change everything into php? Or is there something else we can do?
In your case I would recommend contacting your web host to find out what they recommend to get this working. You would get the best results from setting this up through .htaccess, but the hosting company may need to change or enable something to get it to work for you.
The best way to learn anything, is to question everything.
WigeDev - Freelance web and software development
Again, thanks a lot for your help. I'll call GoDaddy to see what they can do. In the meantime, we've gone the way of all php files.
Webmax, Godaddy is notorious for this sort of problem. My best suggestion to you is to simply google "Godaddy Hosting" and then, having had your eyes truly opened, search for a real host!
I'd start your search here:
Web Hosting Talk - The largest, most influential web hosting community on the Internet