Can some sort of wildcard redirect be used on a single folder path?
-
We have a directory with thousands of pages and we are migrating the entire site to another root URL. These folder paths will not change on the new site, but we don't want to use a wildcard to redirect EVERYTHING to the same folder path on the new site.
Setting up manual 301 redirects on this particular directory would be crazy. Is there a way to isolate something like a wildcard redirect to apply only to a specific folder?
Thanks!
-
Hi Corp Analytics,
Alex has raised some important questions. Did you see his response? Let us know so we can help, thanks!
Christy
-
I'm not sure I entirely understand what you're trying to achieve. Could you post a few examples of what you would like to redirect (and to what) and what you wouldn't want to redirect? Also, which web server are you using (nginx, Apache, IIS...)
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
-
Recovering from an open redirect
From a previous company we have inherited a domain which once contained an open redirect redirect.magnet.me. Even though this domain has been returning a 410 for every single request directed at it for the last few months, we continue to see new links popping up in Google which refer to this domain https://www.google.com/search?safe=off&q=%22redirect.magnet.me%22 Currently we just keep disavowing these links, but at the same time they keep appearing in our Moz.com tooling, being unable to disavow those links here. Does anybody have any successful tips how to deal with this scenario, compared to only disavow new links after the fact?
Intermediate & Advanced SEO | | rogier_slag0 -
301 redirects
One of our employees took an SEO class recently. She was told that having too many 301 redirects can hurt SEO. I have never heard of 301 redirects as having a negative impact. Any thoughts?
Intermediate & Advanced SEO | | Smart_Start0 -
Redirecting to Modal URLs
Hi everyone! Long time no chat - hope you're all well! I have a question that for some reason is causing me some trouble. I have a client that is creating a new website, the process was a mess and I am doing a last minute redirect file for them (long story, for another time). They have different teams for different business categories, so there are multiple staff pages with a list of staffers, and a link to their individual pages. Currently they have a structure like this for their staff bios... www.example.com/category-staff/bob-johnson/ But now, to access the staffers bio, a modal pops up. For instance... www.example.com/category-staff/#bob-johnson Should I redirect current staffers URLs to the staff category, or the modal URL? Unfortunately, we are late in the game and this is the way the bio pages are set up. Would love thoughts, thanks so much guys!!
Intermediate & Advanced SEO | | PatrickDelehanty0 -
Robots.txt: Can you put a /* wildcard in the middle of a URL?
We have noticed that Google is indexing the language/country directory versions of directories we have disallowed in our robots.txt. For example: Disallow: /images/ is blocked just fine However, once you add our /en/uk/ directory in front of it, there are dozens of pages indexed. The question is: Can I put a wildcard in the middle of the string, ex. /en/*/images/, or do I need to list out every single country for every language in the robots file. Anyone know of any workarounds?
Intermediate & Advanced SEO | | IHSwebsite0 -
How to do a wildcard redirect?
Sorry if this is a dumb question, but I am not a programmer and my client's programmer is asking me how to set this up. Normally I do it in my cPanel, but they can't and need to write it in the .htaccess file. The client's new website was posted at dev.site.com and of course their programmer put robots="index,follow" and so the site is completely indexed. They are launching it tomorrow at www.site.com. I need a wildcard redirect that takes dev.site.com/anything and 301 redirects it to www.site.com/samething if that makes sense. Basically redirects every dev.site.com URL to www.site.com so we don't have duplicate indexation issues. Can anyone tell me the code to do this that needs to go in the .htaccess file? I would just do it through cPanel but that's not an option, so any help is appreciated.
Intermediate & Advanced SEO | | DanDeceuster0 -
301 redirect for duplicate content
Hey, I have just started working on a site which is a video based city guide, with promotional videos for restaurants, bars, activities,etc. The first thing that I have noticed is that every video on the site has two possible urls:- http://www.domain.com/venue.php?url=rosemarino
Intermediate & Advanced SEO | | AdeLewis
http://www.domain.com/venue/rosemarino I know that I can write a .htaccess line to redirect one to the other:- redirect 301 /venue.php?url=rosemarino http://www.domain.com/venue/rosemarino but this would involve creating a .htaccess line for every video on the site and new videos that get added may get missed. Does anyone know a way of creating a rule to rewrite these urls? Any help would be most gratefully received. Thanks. Ade.0 -
301 Redirect using rewrite rule in .htaccess
Hi guys, I have these types of URLs with the format below that are seen as duplicate contents http://www.mysite.com/index.php?a=11&b=15&d=3&c=1 I wanted to permanently redirect them to my homepage. I am thinking if this is possible in .htaccess using rewrite conditions? Thanks in advance...
Intermediate & Advanced SEO | | Trigun0 -
Redirects Going to the Wrong Place
I just checked our rankings for a few of our top keywords from a previously merged domain, and we are not anywhere on the first page (we used to rank #1). I then manually typed in the url of a top product we sell from our old site that was merged into the new site. It turns out that the redirect isn't going to the right place at all (which probably explains why the page isn't ranking). Here is part of the code from our htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} ^neuroformulas.com$ [OR]
Intermediate & Advanced SEO | | vitasouthmktg
RewriteCond %{HTTP_HOST} ^www.neuroformulas.com$
RewriteRule ^/?$ "http://www.vitasouth.com/brands/NeuroScience.html" [R=301,L] ErrorDocument 404 /404.html redirect 301 /products/Kavinace.html http://www.vitasouth.com/products/NeuroScience-Kavinace.html The bottom redirect (http://www.neuroformulas.com/products/Kavinace.html) should be going to the url specified. Instead, it goes to http://www.vitasouth.com/NeuroScience.html/Kavinace.html (NOT A VALID URL!). Please help! Thanks! -Matt0