Htaccess - multiple matches by error
-
Hi all,
I stumbled upon an issue on my site.
We have a video section:
htaccess rule:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^video index.php?area=video [L,QSA]Problem is that these URLs give the same content:
www.holdnyt.dk/anystring/video
www.holdnyt.dk/whatsoever/videoAny one with a take on whats wrong with the htaccess line?
-Rasmus
-
Hi Rasmus,
You can try what Emanuele mentioned before and if it doesn't work please let me know exactly which are the different alternatives of the URLs that you want to rewrite and the output URLs that you're looking to get so I can help you.
Thanks!
-
Hi Rasmus, maybe I'm missing something but it seems that you've set up a rule only for your www.domain.com/video page. The string ^video matches only that one and not domain.com/whateveryouwriteherewillbeignored/video
Try to add a (.*) before and associate that with a parameter since the only value you're passing is that the area is video I don't see anything specified in htaccess for that.
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
-
Crawl Attempt Errors & Homepage Not Ranking
Hi all, I have scanned the community forum thoroughly to find a solution to this issue and noticed some detailed and informed responses, but I am not sure which apply to the issue we are currently having. We are receiving a lot of 803 Crawl Attempt Errors on a weekly basis for our site www.mangofurniture.co.uk and also our homepage isn't ranking and I can't help but think that the two are linked. We have some rankings for the internal pages and have a couple of other sites that use the same template as www.mangofurniture.co.uk that are doing well with no crawl attempt errors and strong homepage rankings. There are a lot of great resources out there on the Moz forum and elsewhere but I am little unsure what applies to our problem or whether to two are linked at all. We have tried rewriting the homepage and developing the internal linking system but to no success as yet. Also, because the site is fairly new so the link profile is quite small at present. Any advice regarding this would be greatly appreciated. Many thanks in advance.
Technical SEO | | FurnitureGeek0 -
Google Webmaster Structured Data Error
In google webmaster tool in Structured data it is showing me 396 items with errors i.e. Data Type - Product, Source - Markup:schema.org, Pages -351, Items -351, Items with Errors - 351 When i click on the 351 in that it is showing Missing:Price but when i click on that product i can see the price 2) Data Type - searchresultspage, Source - Markup:schema.org, Pages- 47, Items - 47 Items with errors -45 When i click on the 47 in that it is showing Missing:Price but when i click on that product i can see the price So i am not getting what is the actual error?
Technical SEO | | jackinmathis10 -
Multiple H1 tags in Squarespace
Hi. I'm using Squarespace, and I've noticed they assign the page title and site title h1 tag status. So if I add an on-page h1 tag, that's three in total. I've seen what Matt Cutts said about multiple h1 tags being acceptable (although that video was back in 2009 and a lot has changed since then). But I'm still a little concerned that this is perhaps not the best way of structuring for SEO. Could anyone offer me any advice? Thanks.
Technical SEO | | The_Word_Department0 -
Is anyone able to check this 301 redirect for errors please?
Hi, I had a developer write a 301 wildcard for redirecting old hosted site to a new domain. Old URLS looked like /b/2039566/1/akai.html
Technical SEO | | Paul_MC
With varying letters & numbers. I have 26,000 crawl errors in GWT and I can only imagine it's because this is looping?
Can anyone advise if this would be causing grief? Thanks
Paul RewriteCond %{HTTP_HOST} ^vacuumdirect.com.au$ [OR]
RewriteCond %{HTTP_HOST} ^www.vacuumdirect.com.au$
RewriteRule ^/?$ "http://www.vacuumbag.net.au/vacuum-cleaners.html" [R=301,L] <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^p/([0-9]+)/(.*) default/$2 [R=301,L]</ifmodule> <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^c/([0-9]+)/1/(.*) default/vacuum-bags/vacuum-cleaner-bags-$2 [R=301,L]</ifmodule> <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^p/([0-9]+)/(.*) $2 [R=301,L]</ifmodule> <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^c/([0-9]+)/(.*) default/$2 [R=301,L]</ifmodule>0 -
How to Recover from the Exact Match Domain Update last weekend?
Hi, Our main website a geo exact match city dot com domain which is 18 years old got all its rankings washed away from top ten to 300th to 400th position plus on Google. We are still top 10 on Yahoo and Bing for the City term. The site is Dmoz listed , has quality updated daily content and no paid advertising or links of any kind. I joined seomoz today and noticed I via the page optimiser that the main keyword for the city which is the exact match domain was over optimised but its hard to talk about events and news in a city without mentioning the citys name lol Looking at the backlinks in the open site explorer tool I noticed alot of spammy links from chinese website and weird domains that were not related and am beginning to think I was the victim of a negative seo campaign. I submitted a re-consideration request with Google and they replied in the space of a few days saying that it was not a manual penalty and that it was down to there algorithm changing or perhaps I changed cms or made changes. There was no unatural links warning either. Funny thing is the website is wordpress based and we changed to a new theme 2 weeks ago and also moved to a new server. Just wondering people views on what my next move shoud be to try and regain our rankings on Google I already toned down the use of the city keyword on the homepage. Regards Tom
Technical SEO | | glenanail0 -
302 error removing site from results
I have a client who had a screwy url structure based off of parameters and all. They hired a developer that added the keyword to the end of the url and set up 302 redirects to the new keyword included url. Since then the entire site has virtually gone missing in the results but it is not penalized. I put in a request with webmaster tools for reconsideration and they said there was no penalty. I only just found the 302 problem today and think this is probably the problem. Could this remove a site from the search results?
Technical SEO | | webfeatseo0 -
Multiple Domains for One Site
We are building a site for a new miniature golf course. They have a long name, which they don't want me to mention, but it's equivalent to a name like Golden State Golf and Putt. They also have a restaurant with its own name and brand that will be a part of the mini golf course and its website, much how Hotel websites have their restaurants on their sites. Before becoming our client they purchased golfandputt.com and want to go with this domain for simplicity sake. In addition to this domain name they purchased 7 others that contain the bussiness' full name in some way, such as: goldenstategolfandputt.com goldenstategolfandputt.net, goldenstategolf-guitar.com etc., As well as: 3 variations of the golfandputt.com domain 3 variations of the restaurants name They wish to have all of these redirect to the main website or the restaurant page to "help with SEO," as they told me. From what I have researched on SEOmoz it seems better to simply optimize the website for Golden State Golf and Putt and the restaurant page for the restaurant's name. Additionally, I'm worried that redirecting the domains to the site will actually hurt them in rankings. If someone can shed some light on what the best practices for this sort of situation are I'd be much appreciative. Apologies in advance for the lengthy explanation but its a bit of a unique situation.
Technical SEO | | TVI0 -
REL Canonical Error
In my crawl diagnostics it showing a Rel=Canonical error on almost every page. I'm using wordpress. Is there a default wordpress problem that would cause this?
Technical SEO | | mmaes0