Mod rewrite question
-
Sorry in advance if this isn't the best place to ask this question.
Google Webmaster Tools has recently identified a ton of "Not Found" pages, which are actual pages with some digits appended at the end.
For example, suppose an actual page on my blog is:
(A) http://www.example.com/blog/2012/09/my-post-title/
This page works just fine.
However, GWT has identified the following page as a "not found" page:
(B) http://www.example.com/blog/2012/09/my-post-title/9157586677/1846732913010
This appears to be happening to hundreds of posts on my site. In each case, the "9157586677" portion of the URL is identical, but the remaining 13 digits change from page to page.
I haven't been able to determine exactly what is causing this to happen - it's probably a social plug-in for Wordpress, or perhaps Disqus, but I'm not sure which one. I'll go through a process of elimination to narrow it down over the coming week.
As a quick fix, I'd like to create a ModRewrite rule so that requests for (B) get 301 redirected to (A). Since there are hundreds of posts, I need to do this in a way that works regardless of what's in the "/2012/09/my-post-title/" part of the URL.
Unfortunately, mod-rewrite is outside of my area of expertise. Can somebody please suggest how I can handle this? Thanks in advance.
PS - As for tracking down the cause, I've looked at the source of the pages in the "Linked From" area of GWT and the Not Found link is nowhere to be found. That is why I assume the bad link is being generated by some javascript that is a part of one of my plug-ins.
Update: It seems like Disqus is the source of these phantom links. There's considerable discussion here. I'll continue searching for a long-term solution. Meanwhile, I'd still appreciate help with the mod-rewrite question above. Thanks again.
-
I've found a solution and am posting it here in case anybody else is having the same problem:
RewriteRule ^([0-9]{4})/([0-9]{2})/([^/]+)/[0-9]+ /blog/$1/$2/$3/ [L,R=301]
-
I hadnt seen the update over Disquss at the end of the post.
Please, post all your advances on this topic Ahirai
Best regards!
-
Hi ahirai,
I was gonna say you should check the linked from tab in GWT but since you actually did it, for me its pretty sure that a plugin that drives content is creating this issue from scratch.
Since i´m neither an apache expert, i can´t give you a method to do the dirty work, but i can tell you the problem is created by some 3rd party plugin driving content of site.
Please, post your advances in the topic!
Good luck!!
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
-
Google My Business Service Area Question
Hello Moz Friends I just wanted to make sure I'm doing things correctly. On google my business your given the option to list your service area. I serve the entire state of Colorado with my internet marketing services. So I listed Colorado as my service area. but Moz Friends, is this the wrong idea? Like should I list the major cities and call it good? So instead of service area Colorado, I should put Denver, Colorado Springs, Pueblo etc Thank you for your friendly help Chris
Technical SEO | | asbchris0 -
.htaccess redirect question
Hi guys and girls Please forgive me for being an apache noob, but I've been trawling for a while now and i can't seem to find a definitive guide for my current scenario. I've walked into a but of a cluster$%*! of a job, to rescue a horribly set up site. One of many, many problems is that they have 132 302redirects set up. Some of these are identical pages but http-https, others are the same but https-http and some are redirects to different content pages with http-http. A uniform redirecting of http to https is not an option so I'm looking to find out the best practice for reconfiguring these 302s to 301s within .htaccess? Thanks in advance 🙂
Technical SEO | | craig.gto0 -
One more redirect question
If there are two URLs like below: example.com/toys/batman-toys
Technical SEO | | IceIcebaby
example.com/birthday/batman-toys Both have the exact same everything, except URL key. The first example ranks for all KWs and search terms in the SEs. Does having the second page hurt my ranking potential for the first page? Should I redirect the 2nd page to the first or just leave it? As always, thanks for your help.0 -
Need very urgent advice on Wedsite Migration questions please.
Good afternoon, I am in the middle of re branding my Computer Repair Business that has been established for the past 5 years now and does very well in GOOGLE for all things computer repair search related queries. I have a done tons of research on the Migration process and all elements involved for the past month now and I have been doing SEO for the past 5 years and am quite knowledgeable and very fluent with search engine optimization. I have a bit of a unique situation going on in my particular instance. Not only am I re branding the business and trying to maintain my GOOGLE rankings trying to pull this off at the busiest time of the year (summer months) but I am also going to be physically relocating my business after the busy (Summer Season) from my current location of Wilmington, NC to Charlotte, NC. Yes, I do understand that Winter would have been the best (time) to do all of this massive changing around but, my hand is forced and this is being done out of necessity for monetary survival purposes and I really have no choice in the matter currently! With that said here is my dilemma. I am setting up a SILO Site Architecture using the "Thesis Framework" and WordPress which will be an improvement by 5 fold of what I have in my current well established JOOMLA site that has done very well in GOOGLE Search these past 5 years (all first page results) for anything (Computer Repair) related in Wilmington, NC. So, I am trying run damage control on this situation and I have a number of questions that need a strategic well thought out answer from a different perspective on this matter. 301 Redirect question: I want to include my geo targeted location in my URL String as it has served me well in the pass however, seeing how I am going to be Physically relocating myself and the business to Charlotte, NC from my current location of Wilmington, NC after the summer months what will I need to take into consideration with this situation in regards to the 301 redirect? _ "If I include my current location (Wilmington NC) in the destination (New Domain) URL string for any given 301 redirect from my existing website to the new website and then physically move to another city 3 months later is this setting myself up for a BIG Failure??"_ Seeing how I have no idea of how this technically works with GOOGLE as far as how long this (migration process) takes to Fully complete where the OLD domain completely drops off and everything is Fully passed over to the New Domain in terms leaving the 301 Re directs in place on the Old Domain Server. How long does this process usually take with GOOGLE? Information that you should know: This is my First Experience doing a Site Migration! The NEW DOMAIN is on a Different Server and IP I will be performing 301 Redirects on a Page to Page Basis! I DO plan on keeping the Old Domain Server Account online for 4 months after the migration process. Both OLD and NEW domains are on HOST GATOR (separate accounts) I am Migrating from JOOMLA to WordPress I am using the Thesis Framework for the new WordPress site (New Domain) I have created and established a well thought out SILO Site Architecture for the (NEW DOMAIN) using Parent and Child Pages in WordPress (not posts) supported by many hours of keyword research for my SILO Themes I am changing My Existing /computer-repair.hml URL Structure to WordPress **/computer-repair/ ** remember.. (using WP - Pages) not posts! I am re branding my Company business from Community Computer Repair to PC Medics On Call I am reducing my on page Content because it is too long in the Tooth for my customer base and although the search engines love it, in it's current state (long winded and well written) it is having a negative effect on the people that actually pay my bills (my customers) but my new Site Hierarchical Structure will rectify a lot of the negative fall out from this change that would otherwise kill me in the search rankings from doing this. In addition to being an proficient SEO I am also a developer and a coder. The New Domain is Currently ALLOWING only my IP Address while I sort this out and until I complete the new site structure and get the content and ON Page done. For the Destination Domain URL Structure, is including my current City (Wilmington NC) going to be an issue with the 301 Redirects seeing how I am moving to Charlotte NC around September? Having the Geo Targeted City in my URL Structure will help offset some of the damage caused by the changes that I need to make. Plus, the URL looks less spammy looking at the examples below when icluding location after the keyword phrase **Example -1 - ** VIRUS REMOVAL SILO With GEO Targeted Location after Keyword http://www.pcmedicsoncall.com/virus-removal-wilmington-nc/malware-removal/ Without - GEO Targeted Location after Keyword http://www.pcmedicsoncall.com/virus-removal/malware-removal ** Example -2 -** COMPUTER REPAIR SILO With GEO Targeted Location after Keyword http://www.pcmedicsoncall.com/computer-repair-wilmington-nc/laptop-repair/ Without - GEO Targeted Location after Keyword http://www.pcmedicsoncall.com/computer-repair/laptop-repair/ As far as the potential problems with icluding the Wilmington NC in the Targeted URL destination for the 301 Redirect and then changing my Actual City location for the business 2 1/2 - 3 months later is this going to be an issue? Pertaining to the 301 redirect question above, how exactly would I handle this if I used Wilmington, NC after the Keyword when I initiate the 301 Redirect to the site? Can I later change this in the OLD Domain .htaccess 3 months later to reflect the Charlotte Location and also do the necessary 301 Redirect in the NEW DOMAIN to reflect the permanent move? I hope I have not confused this any by the way that I am asking? Here is a screen shot of the NEW DOMAIN layout for the Links below and above. NOTE: Currently, ALL Silo Menu Themes have - wilmington-nc/ incorporated after the targeted Keyword http://www.pcmedicsoncall.com/virus-removal-wilmington-nc/malware-removal/ http://www.pcmedicsoncall.com/virus-removal/malware-removal SEOMOZ-PC-MEDICS-ON-CALL-1.jpg SEOMOZ-PC-MEDICS-ON-CALL1.jpg
Technical SEO | | MarshallThompson310 -
Pageing page and seo meta tag questions
Hi if i am using paging in my website there is lots of product in my website now in paging total paging is 1000 pages now what title tag i need to add for every paging page or is there any good way we can tell search engine all page or same ?
Technical SEO | | constructionhelpline0 -
The Ultimate Question
This is probably going to look bad, but Im going to do it anyway. Ive owned my own business for over twenty five years. Due to the economy and a health crisis, my business has come to an end. Im left pretty much with nothing except my family, which is on shakey grounds as well. anyway. Ive been working on the IM, SEO thing for about two years. Ive made some money, but nothing that would make a difference to my situation. I now have a site in a competitive niche. The site is rated A by the app here on seomoz. But my site is lacking in authority backlinks. I write my own posts, about two a day, and honestly, it is of much better quality than those ranking . My site stays right around #11. Every other day, the site goes to #7 or 8. When that happens, I make between 300-400 a day. Then it falls back to 11. So the on site is good, rated A here. My site is speedy Not enough backlinks The content is good I was foolish enough to believe the G story about backlinks not being important. Concentrate on the content. All of that crapola. The sites that are ranking well have all the typical xrumer links. Totally not related links. Junk. And from what Ive seen, I believe the sites ranking 1-3 are making about $1000. a day. So you can imagine what being this close, after losing so much is doing to me. So.... Right now I am just writing content, pinging, social bookmarking and submitting rss feeds daily. Does anyone have any real information on how to bump my site up in rankings. Please, no stories about guest blogging, or attempts to sell me your SEO service I know I would do it for someone else and I have many times in the past. If you can help me, please reread, and contact me. I wish you all the best. Sorry for the melodrama.
Technical SEO | | vansy0 -
Another http vs https Question?
Is it better to keep the Transaction/ Payment pages on a commercial website as the only secure ones (https) and remainder of website as http? Or is it better to have all the commercial website as secure (https)?
Technical SEO | | sherohass0 -
How to skip all rewrite rules
My web host account allows me to have multiple domain names. Internally, the first domain is the main domain, and the additional domains are virtual domains, but externally, the intent is for each domain to appear as a unique domain. When accessing a virtual domain, the server first processes the main .htaccess file, and then processes the .htaccess file for that virtual domain. I'm sure this is a common setup, and this is not unique to my web host. Due the main .htaccess file, references to virtual.com are rewritten as main.com/virtual. The web pages are displayed correctly, but of course, this rewrite is not what is desired. What is the common solution? For example, is there a conditional rewrite rule that says ignore the rest of the rewrite rules in this .htacces file? Best,
Technical SEO | | ChristopherGlaeser
Christopher0