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
-
If My site has 20 DA will it be good to get backlinks from a very low DA 3 site for free
is there any side effects to get backlinks from a site which has low DA than you?
Link Building | | ShashankDubey10 -
MOZ indicates 404 page and 0 backlinks, after 301 redirect. The best redirect solution?
Dear MOZers, I have one concern i would like to ask you.. My website have valuable backlinks to the most important page which is awesome. But, some of those backlinks is old URL which is 301 redirected to the URL I use today. As far as i know 301 redirects pass page rank, so it should be alright. (?) Link i use today: domain.com/awesome-url/ My backlink: domain.com/old-boring-url/ 301 redirected to domain.com/awesome-url/ What bothers me is that in MOZ report (Link opportunities) MOZ indicates my important URL (domain.com/old-boring-url/) return 404. But, it is not true. It is 301 redirected to domain.com/awesome-url/ and it works! I am worried i am losing important link juice here(!?) Also, my On Page Grader tool for domain.com/awesome-url/ reports 0 backlinks. And that is not true! I know exactly which websites are linking back, only problem is that those website are using old URL (domain.com/old-boring-url/) to link back to my website. Am i doing something wrong? Is there a better way to redirect and save valuable link juice for my page? Thank you very much! PS The URL was changed in March 2015.
Link Building | | Chemometec0 -
Site scraped/Backlink problem?
Hi - I was looking in my Google webmaster tools because we saw a huge jump in backlinks last week. We found this one article with 84,475 total links, which obviously stands out as spam. All the links are from 1 page and 1 domain (financeai.com). This is the article on our website - http://loyalty360.org/resources/article/engaging-customer-atmosphere-at-pizza-patron and webmaster tools says all the links back to it come from this page http://financeai.com/forex/mxn/pkr/q/39665 My question is - should we/what can we do to clean this up? How does this impact our search ranking? We have had some issues with our website getting extremely slow overnight, and we believe the site scraping is really slowing down the site at points. Thanks.
Link Building | | carlystemmer1 -
30,746 Links from One Site to Our Site
I learned this morning in our Google Webmaster Account about a website has 30,746 links to our website. Both our website and their site present information related to plastic materials, so in essence they complement one another. However, is having that massive amount of links from one site to ours a bad thing and should we use Google Disavow? Also, they have a PR3 while our site is PR5 (not sure if that matters much).
Link Building | | Prospector-Plastics0 -
Linking strategy between my own sites
Hi, I have one main site, let's call it food.com I also have 10 smaller sites, let's call them mexicanfood.com, indianfood.com, italianfood.com etc food.com is on its own separate dedicated server the 10 smaller sites are all on a shared IP in hostgator I don't want Google to think that I have created the 10 sites for only purpose of creating links to each other. So, would you recommend that all those 10 sites link to each other? or should there be no interlinking within those 10 same IP domains? What about linking from those 10 sites to my main site? How should I structure my own backlinks not to get penalized by Google ?
Link Building | | limens0 -
Links from Domain Portfolio Advertising Sites
I recently purchased a domain from a someone with a large portfolio and my site's link is still found on thousands of his one page/low quality sites. I find these links on Open Site Explorer but not in WT. Should I ask the portfolio owner to remove the link from his low quality domain advertising sites?
Link Building | | mj7750 -
What are good sites to get no-follow links from?
Yahoo Answers is a good one. What other sites have you guys used to get no-follow links? Blog comments excluded from this.
Link Building | | qlkasdjfw0