Can I make a universal 301 redirect rule for my site?
-
I.e. I switch shopping carts and every page has the same path/name but now ends in .php instead of .htm.
-
If you have mod_rewrite enabled on your server you could try something like this in your .htaccess file:
RewriteCond %{REQUEST_URI} ^(.).htm$
RewriteRule ^(.) /$1.php [R=301,L] -
You can use Excel formulas to generate a list with all your URLs with .php....
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Fitness- china.com 301 Redirects
After I switched to 301, will the backlinks obtained by the previous domain name be transferred to the new URL? our Weight Machine new URL https://www.fitness-china.com/weight-machine
Link Building | | ahislop5740 -
Broken Incoming Links from External Site - What to do?
Our Google Webmaster 'page not found' reports consistently show two Chinese websites that have approximately 50 broken links each to non-existent pages on our website. One site is a PR5, the other a PR1. Two of our Chinese employees have contacted the site owners (even talking with them over the phone) to discuss the errors, where the broken links live on their sites, and how to fix them. They have contacted the site owners three times in the past three months, but still the broken links have not be fixed. What do you recommend we do?
Link Building | | Prospector-Plastics0 -
Free PR Sites
Is it advantagous to post to PR sites such as this one: http://www.i-newswire.com/fitness-professional-online-launches/218349 I've seen posts like these on several sites - same post on multiple sites. I'm wondering if it's even worth having them on one, or multiple. Thoughts?
Link Building | | DougHoltOnline0 -
Can copyright links to your site have a negative impact on your SEO?
many of the websites we designed have a copyright link in the footer. Like: webdesign by company name then this is made a hyperlink to our company website. Some of these websites have a high PR and other metrics but rarely are about webdesign. What is a clever thing to do? Tom
Link Building | | Onlinq0 -
Link Buildinf for new sites
Hello friends, I would like to know what link building strategies you recommend for a newly created websites? Thanks a lot!
Link Building | | pasape0 -
How do you remove links TO your site?
Lots of old links to our wine rack store site from many years ago, how do I get these removed? block them? Not sure if Penguin got us because of these....
Link Building | | AmazingUniverse560 -
Links for edu and gov sites
So it is general knowledge that links from .edu and .gov sites are valued higher by Google. So, I hired some guys on freelance sites to help me buildlinks and get some love from SERPS. But one thing I notice quite often is that some of these links are actually like *.edu.tw (with a international TLD after .edu) What is your thoughts on links like that, do they have ANY edu value?
Link Building | | limens1 -
Should I 301 Redirect The index.html Page?
Hello, As an experiment I am trying to work with an SBI site but am noticing index.html is being forced on me as the homepage. As I understand it's good practice to 301 redirect the index.html page to the to the actual home page. Can someone please confirm that I am right in thinking this? Here is an example: http://www.anguilla-beaches.com/index.html
Link Building | | umtmedia
http://www.anguilla-beaches.com/ According to yahoo 773 links are pointing to the index.html page and 771 links are pointing to the / page. I'm sure Google knows that these are the same pages and does not consider them as duplicate but surely the index.html page should be redirected right? am I going mad here? Now if we look at this site: http://www.jugglenow.com the homepage has 198 links according to yahoo
http://www.jugglenow.com/index.html this page also has 198 links? now I am confused, are these 2 the same page? On this page: http://www.jugglenow.com/juggling-balls.html notice how there is no link to the actual homepage but there is a link to the index.html page. Am I missing something here because I can't figure it out, surely there should be just 1 homepage without a index.html page. Any help would be appreciated0