Need some help with my htaccess -...

User 1975732 Photo


Registered User
31 posts

Hi
I have completely redone one of my Old FrontPage websites to HTML.

Temp folder is http://www.puertomorelosvillas.com/PMV-2012/index.html

I have questions about the .htaccess file I made. <br />
Hoping some of you experts out there can help… I did read the htaccess PDF from Coffee Cup but didn’t find these issues.


1st – I added Rewrite so all non-www (urls) so they would redirect to www (urls) and index.html redirects to www. (So I would not end up with Google’s duplicate content or lose my backlinks) Did I do it correctly?


2nd – When I did the 301 redirects I redirected some to index.html – since I did the rewrite (above) should I have just redirected to www. (Or is ok?)


3rd – I had a whole lot of old url’s with “spaces” (%20) – I had read you don’t use the %20 in the htaccess file you use a space but use “url” so that is what I did… ok??


3rd – FrontPage has a whole lot of folders that are for the FrontPage Extensions …Do I need to do some kind of redirect with those since they are all gone now??? I just made 301 redirects from my old sitemap.xml submitted to Google I did the whole thing even though some of the url’s were not indexed by Google.


Thanks
Liza (Cancun)

Copy of 1st half of htaccess file.

<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=600, public"
</filesMatch>

<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=600, public, must-revalidate"
</filesMatch>

<filesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=600, must-revalidate"
</filesMatch>

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>

Options Indexes
ErrorDocument 404 www.puertomorelosvillas.com/404-error-p … illas.html

RewriteCond %{HTTP_HOST} ^puertomorelosvillas\.com [NC]
RewriteRule ^(.*)$ http://www.puertomorelosvillas.com/$1 [L,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(default|index)\.(html|php|htm)\ HTTP/ [NC]
RewriteRule ^(([^/]+/)*)(default|main|index)\.(html|php|htm)$ http://www.puertomorelosvillas.com/$1 [L,R=301]

redirect 301 "/http://www.Puertomorelosvillas.com/what makes us special.htm"
http://www.puertomorelosvillas.com/contact.html

redirect 301 "/http://www.Puertomorelosvillas.com/Villas for Rent.htm"
http://www.puertomorelosvillas.com/villas-for-rent.html

redirect 301 "/http://www.Puertomorelosvillas.com/Villa_Reviews.htm"
http://www.puertomorelosvillas.com/index.html


…….30+ more 301 redirects…….
User 187934 Photo


Senior Advisor
20,247 posts
Online Now

As far as those links with spaces, if you type the old url and you get redirected to the new one then you know the 301 was done correct.:)
Here's some helpful reading.
http://www.javascriptkit.com/howto/htaccess.shtml
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.