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 -
Spammer sites brining my DA score down
A disgruntled web developer registered my domain with a dozen spammer sites, so my score plummeted. Is there a way to get these removed?
Link Building | | generuble0 -
Best way to set up a support site - sub domain, separate site or com/support?
My company is setting up our support site. It has been suggested that we set it up as a separate domain - www.company-support.com, rather than setting it up as a sub-domain (www.support.company.com) or the usual www.company.com/support. The person who proposed this believes it wlll create link juice, but i wonder if splitting the traffic will create more harm than good? Opinions please!
Link Building | | googilvie0 -
Reassessing site achitecture
Firstly I'm only a recently new member but am already a big fan and rely on the tools a lot. For the sake of context, our site is www.cleancruising.com.au which we've steadily built into one of Australia's top cruise sites. We've focussed on building unique content including a mapping engine to show over 10,000 cruise routes, 3D ship models for virtual tour simulations and over 350,000 words of unique descriptive content. So we think we've got some good content which we currently rank quite well for, but think there's a lot of room for improvement with the links, both internal and inbound. Looking at the internal links, I thought the site architecture was pretty good but now I'm not so sure. The site hierarchy is like this: home > cruiseline (20) > ship (200) > itinerary page (12000) > enquiry form and home > region (25) > port (1400) > itinerary page (12000) > enquiry form My question is, am I wasting link juice by doing the following? A sample itinerary page shows lots of links through to the enquiry form (with different parameters). However years ago we added the enquiry form to be blocked via robots.txt and none of these page variations are indexed by google. Is this stuffing up the link flow, and should I allow the forms to be indexed so their links can add value back through the site? Are there any tools for visualizing a site link structure? Lots of questions and hope this is appropriate. 1am in Australia so may take a few hours before any follow up posts, cheers
Link Building | | cruiserDan0 -
Are there benifits to aquiring domain names with keywords of a niche site and redirecting them to the niche site?
I f i purchased a domain with keyword another one of my sites targeted and redirected it to that site are there benefits in doing so? & as long as the domain contained the keywords would it matter if the domain name contained another word?. also would it be better to put just a few articles on the site and then point keywords in the article to the niche site?.
Link Building | | askshopper0 -
Challenge: How to SEO a site with almost no content
Wondering what you all would recommend for SEO on this site: www.gudville.com Most of their content is behind a login. Basically there are 5 pages open to Google and to anyone without that login, and they are not open to doing it differently at this time. Once in, there will be a lot of sharing with Facebook friends that will include invitations to join them in their causes. Love to hear all your recommendations. Kathy
Link Building | | katandmouse0 -
One Website or Mini Sites?
Hello and thank you in advance for your responses. My wife and I have been running a small service business for over 5 years and we recently came upon an untapped niche in our industry we will like to explore. We have found some niche keyword specific domains and have been contemplating building a few specific minisites linking to our main site(blog) in order to reach a more targeted audience. It seems the more I research this concept the more confused I guess. My questions are the following: 1. Should we create a main blog, for example: "BestHotelConferences.com" and have some (about 10) independent optimized sites "HiltonConferences.com," "MarriottConferences.com," linking to our main blog or should we optimize these pages within our main blog? 2. If we choose to create this minisite buildout concept and these domains yield the following monthly search results which one should we pick? HiltonConference.com - 3900 HiltonConference**s.**com - 1700 HiltonHotelConference - 730 HiltonHotelConferences - 580 I have heard that the plurals already include the singular version however they will not be an exact match. Also if we add the word hotelwe will be targeting a broader audience since "hilton conference" will still be included in the domain name, but once again it will not be an exact match. Please help! Which domain name should we pick?
Link Building | | Laz1010 -
Finding sites to target for backlinks
How can I quickly find a list of sites that link with follow and 301 links to my competitor, but not to me?
Link Building | | Nashville0