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
-
SEO value of 301 redirects from non-existent sites.
I have a question about an SEO tactic. There is this site that has purchased three domain names, and has redirected them to their main site. The three domains are: Spokaneduilawyer org, Spokaneduilaw com, and Spokaneduilawfirm com and the website has all three domains redirecting to their main site. What is the SEO value with this? I looked at those three domains on Majestic and they have no backlinks that I could find, and when I looked on archive.org I didn't see any history of those domains being actual sites that might bring traffic. What is the webmaster trying to do, and what is this tactic called?
Link Building | | RandyHT0 -
How to make a wrong link profile right
Hello Moz, I want to do SEO a website that is 2 years old and in a different language from English. That website has a very wrong link profile. It has totally about 1500 inbound links and 90% of these inbound links are to home page. Also somewhat of these inbound links are from low quality web sites that have less than 80 inbound links. I think that I can follow 2 strategies to solve this link building problem. First strategy is only link building to internal pages till inbound links to internal pages reach about 80% of total inbound links. Second strategy is disavowing low quality inbound links to homepage and link building to internal pages till again same condition occurs. I think if I only implement link building, I have to produce a large number of content. But if I disavow many inbound links, will I encounter a sharply lose in rankings? If you have a different idea to solve this problem, I will be glad to hear. Also I wonder that if I follow these strategies, how fast I have to implement these? Thanks in advance for your interest.
Link Building | | annettakuchera0 -
Is healthygallbladder.com a spammy site?
Hello Moz Community! We're getting many back links with random anchor text (completely irrelevant) from a website called healthygallbladder.com and various subdomains under that domain. Has anyone else come across this website? I can't seem to load the pages at all. It always comes up with a bandwidth exceeded message.
Link Building | | SylviaH0 -
If i give a key word with a site . I want to know how many times that particular keyword repeated in that site ? Is there any tool for this ?
Any tool for finding a keyword or inbound links by crawling all links of a given website
Link Building | | inkrefuge1 -
LInk Building Ideas for Large Site
Hi, I have a very large sized website of about 5 Million Pages. Earlier i used to rank very well with many naturally occurred links, But now, i lost my rankings with numerous Google updates. My content is user generated content and it wont be pure original as my users will post the same on other forums too. I all of my pages rank on #1 page for their keywords. Can anyone suggest me good link building strategy for larger websites as each url will have different keyword, i want all of my urls to be ranked well. Waiting for your replies.
Link Building | | Vegitss0 -
Inbound links from porn sites into a professional business services site - remove help?
The website in question was hacked four years ago and there was porn on the servers. It was used as a peer to peer torrent streamer. The images were deleted. We have just found inappropriate inward bound links (with great link juice!!) - how can we remove these links - or should we? any advice would be appreciated thanks
Link Building | | GardenBeet0 -
I am seeking a high quality sites to submit articles for free in order to get links. Can you recommend me on those sites?
I am seeking a high quality sites to submit articles for free in order to get links. Can you recommend me on those sites?
Link Building | | yoavm0 -
301 redirect and how linking domains are counted
I have a domain with several great links to it and I decided to change it to a new domain. I did a 301 redirect to the new domain. My question: Let's say youtube.com is linking to the old domain that is being redirected. Do I want to get a new link from youtube to the new domain as well, or is that pointless since there is already one to the old domain? Thanks,
Link Building | | DavidCurrier
Dave0