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
-
Other sites linking to our site through sitewide footers
Hello, We have other sites linking to our site through images in sitewide footers, resulting in a link from every page of each site. Those sites are not owned by us and they decided to link to us on their own. They usually link to us as their "sponsor" or "partner", sponsor as in sponsor of some event and partner as in we sometimes work together on joint initiatives. I've searched Moz forum and other articles, but haven't been able to find an answer to this question. We'd like to make sure Google doesn't consider it to be spammy and we don't get any sort of penalty. Should we ask them not to link to us through those images in a sitewide footer or ask them to simply add "nofollow"? We don't want to remove those links if they are not considered to be harmful and removing them will hurt our DA/PA.
Link Building | | marynau0 -
Should I work with current site or start a new site with more keywords?
I have been working with my site for some time. Sadly, I am moving lower and lower in ranking. I am wondering if I should just transfer my site to a new URL (this time including keywords). I don't understand the whole disavow link thing. I hired someone about 2 years ago, when I lost my ranking due to malicious software. Well, it turns out that, she submitted my link to weird sites that I don't even know what they are. It is like sites with thousands of websites just listed. Things have never been half of what they were and I am really just growing frustrated. I understand that having an a URL for awhile is helpful, but I appear to have lost many of my good linking sites. Any thoughts?
Link Building | | tiffany11030 -
How is this site ranked so high on Google?
How on earth does "southeastasiatravelblog.com" rank No 3 on Google for "Asian travel blog"? It's just a collection of basically PR type travel articles. I have profiled its backlinks using Open Site Explorer and 71% of them are dead. The rest seem to be mostly "run of site" links from his other websites, which aren't particularly travel or Asia related. The highest PA for a live backlink to this site is a link from within his own website (PA 27, DA 15). Most of his backlink anchors are URLs and look fairly EMD to me. The site has few shares (6 FB shares, 7 FB likes, 1 Twitter share). So what makes it rank so highly for this phrase? My site I'm comparing against is "travelnasia.com" which is a fairly new domain with a DA 23, PA 31 and about the same amount of shares but far fewer backlinks at this stage because I recently changed URLs to shake off what might have been an algorithm penalty from Google. I am now receiving a growing level of Google search traffic again, but it's a long climb back. I'm looking at strategies, which is why I was checking out the site above.
Link Building | | Gavin.Atkinson0 -
Too many links from one site?
In webmaster tools in 'links to your site' I have a totla of 819 links but 580 have appeared from one site. Is this bad for SEO?
Link Building | | SamCUK0 -
301 redirect on yahoo hosting
Hi, I was wondering if anyone could lend some advice to getting a 301 redirect on yahoo web hosting; I spoke with someone in SEO and they referred me to a site that had step by step instruction, the only problem is that was for the yahoo store, my business is not e commerce rather a service website. I was wondering if anyone had the same problem, some say that Yahoo does not offer "301 redirects" on their hosting, however, they say there are methods to cirumvent that, my site is html. Any suggestions would be great - thanks best regards, James C
Link Building | | jimmy02250 -
Is it good practise to do a 301 redirect from domain.co.uk to www.domain.co.uk?
As the title says really, I'm sure the answer is Yes, but I cannot remember why probably one of the many things I read somewhere along the line and can't recall the reasoning can anyone enlighten me please?
Link Building | | RankStealer0 -
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 -
Is there a tool to show you new links to your site?
Are there any tools that show you new backlinks that you have recently gained?
Link Building | | MarieHaynes0