Apache Mod Rewrite question
-
Hi everybody,
I need to rewrite this url using mod rewrite, but I've got stuck.
I'd like it to show this one instead:
http://www.diamondgeezer.com/eternity-rings
I'm no expert on this stuff, so any help would be great!
Thanks
-
It's hard to write this kind of code without being able to debug it, but hopefully this will point you in some sensible directions.
First my assumption - based on the URLs you included, I'm assuming you want to rewrite http://www.diamondgeezer.com/anything to serve http://www.diamondgeezer.com/theultimate/search/index.php?sortprice=asc&followSearch=9673&q=anything behind the scenes.
I think there might be some complications around replacing hyphens (-) with pluses (+), but just serving the search results page for the word appearing after the first slash should be as simple as:
^/(.*) /theultimate/search/index.php?sortprice=asc&followSearch=9673&q=$1
The documentation here should help:
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
-
What to do when on your keyword there are no questions ?
Let me give me you an example. For example for the keyword title tag (let's imagine) I would want to rank on that. I go to the keyword explorer or related searches at the bottom of google there are many questions people have.. I find expressions (with the same user intent) such as "title tag length", "title tags generator", " "why are title tag importants" (I found this one using the are questions drop down menu of the keyword explorer). With this in hand I can create a page where I answer all those questions. I would have all those expressions being an H2 and answer the questions using related phrases and context word that I will find with the keyword explorer in my paragraph below. Let now take one of my keyword "Sicily bike tours". If I type this expression int he keyword explorer...the only related phrases (with the same user intent) that I find are "Sicily bike tour", "Sicily cycling tours", "Sicily bike trips"... (first thing I noticed is that it is just variation of my main expression not really question...). If I look at questions I find "what is the highest elevation in Sicily" or "How safe is Sicily for tourists". I don't imagine on a page that sells bikes tours in Sicily having h2 tags that answers those questions... and this is not what people that rank do, they describe their tour and this is what is confusing to me. Let's now take a secondary related keyword to main keyword. Let' s take "Sicily cycling tours" (it is a secondary related keyword to "Sicily bike tours". Based on the keyword explorer, the secondary related phrases to "Sicily cycling tours" are "tour of Sicily". "trips to Sicily".... ( isn't that going to be boring and look unnatural to use all those expressions ? ). There are all synonyms of my expression but not really different which is my worry ? Or can I use an expression such as "Sicilian villages" or "Sicily maps" even though they don't have the same user intent) as my secondary related keyword "Sicily cycling tours". Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Redirect Plugin: Redirecting or Rewriting?
Hey everybody! It's been a while since off the boards! I am reworking a site and I have been looking into their Redirection Plugin. I personally tend to lean towards just using the .htaccess because, well, why not. However, when looking deeper into the plugin I found myself a little confused with their redirection wording. RewriteRule ^/products/landing-page-october-2015/$ /products/special-education-news-october-2015/ [R=301,L] Is that the same thing as a classic Redirect 301?
Intermediate & Advanced SEO | | HashtagHustler0 -
Pagination and View All Pages Question. We currently don't have a canonical tag pointing to View all as I don't believe it's a good user experience so how best we deal with this.
Hello All, I have an eCommerce site and have implemented the use rel="prev" and rel="next" for Page Pagination. However, we also have a View All which shows all the products but we currently don't have a canonical tag pointing to this as I don't believe showing the user a page with shed loads of products on it is actually a good user experience so we havent done anything with this page. I have a sample url from one of our categories which may help - http://goo.gl/9LPDOZ This is obviously causing me duplication issues as well . Also , the main category pages has historically been the pages which ranks better as opposed to Page 2, Page 3 etc etc. I am wondering what I should do about the View All Page and has anyone else had this same issue and how did they deal with it. Do we just get rid of the View All even though Google says it prefers you to have it ? I also want to concentrate my link juice on the main category pages as opposed being diluted between all my paginated pages ? - Does anyone have any tips on how to best do this and have you seen any ranking improvement from this ? Any ideas greatly appreciated. thanks Peter
Intermediate & Advanced SEO | | PeteC120 -
A few important mobile SEO questions
I have a few basic questions about mobile SEO. I'd appreciate if any of you fabulous Mozzers can enlighten me. Our site has a parallel mobile site with the same urls, using an m. domain for mobile and www. for desktop. On mobile pages, we have a rel="canonical" tag pointing to the matching desktop URL and on desktop pages we have a rel="alternate" tag pointing to the matching mobile URL. When someone visits a www. page using a mobile device, we 301 them to the mobile version. Questions: 1. Do I want my mobile pages to be indexed by Google? From Tom's (very helpful) answers here, it seems that I only want Google indexing the full site pages and if the mobile pages are indexed it's actually a duplicate content issue. This is really confusing to me since Google knows that it's not duplicate content based on the canonical tag. But - he makes a good point - what is the value of having the mobile page indexed if the same page on desktop is indexed (I know that Google is indexing both because I see them in search results. When I search on mobile Google serves the mobile page and when I search on desktop Google serves me the desktop page.)? Are these pages competing with each other? Currently, we are doing everything we can do ensure that our mobile pages are crawled (deeply) and indexed, but now I'm not sure what the value of this is? Please share your knowledge. 2. Is a mobile page's ranking affected by social shares of the desktop version of the same page? Currently, when someone uses the share buttons on our mobile site, we share the desktop url (www. - not m.). The reason we do this is that we are afraid that if people are sharing our content with 2 different url's (m.mysite.com/some_post and www.mysite.com/some_post) the share count will not be aggregated for both url's. What I'm wondering is: will this have a negative effect on mobile SEO, since it will seem to Google that our mobile pages have no shares, or is this not a problem, since the desktop pages have a rel="alternate" tag pointing to mobile pages, so Google gives the same ranking to the mobile page as the desktop page (which IS being shared)?
Intermediate & Advanced SEO | | YairSpolter0 -
XML Sitemap Questions For Big Site
Hey Guys, I have a few question about XML Sitemaps. For a social site that is going to have presonal accounts created, what is the best way to get them indexed? When it comes to profiles I found out that twitter (https://twitter.com/i/directory/profiles) and facebook (https://www.facebook.com/find-friends?ref=pf) have directory pages, but Google plus has xml index pages (http://www.gstatic.com/s2/sitemaps/profiles-sitemap.xml). If we go the XML route, how would we automatically add new profiles to the sitemap? Or is the only option to keep updating your xml profiles using a third party software (sitemapwriter)? If a user chooses to not have their profile indexed (by default it will be index-able), how do we go about deindexing that profile? Is their an automatic way of doing this? Lastly, has anyone dappled with google sitemap generator (https://code.google.com/p/googlesitemapgenerator/) if so do you recommend it? Thank you!
Intermediate & Advanced SEO | | keywordwizzard0 -
Advanced SEO question.
Hi, I manage and do the SEO for this site: www.aerlawgroup.com. If you Google "Los Angeles Criminal Defense Attorney", you can see I rank well (1st page). I have managed to achieve similar rankings for interior pages within the site: www.aerlawgroup.com/domestic-violence.html (Google: "Los Angeles Domestic Violence Attorney".) Here is my question. No matter how hard I try, I cannot get to the first page on Google for the search term: "Los Angeles DUI Lawyer", for the following interior page: www.aerlawgroup.com/dui.html. Is there anyway that I can pass the authority/ranking (not sure what to call it) that I have for www.aerlawgroup.com to www.aerlawgroup.com/dui.html so that internal page ranks higher for "Los Angeles DUI Lawyer"? I apologize if my question doesn't make sense. In a nutshell, I'm trying to understand if there is anyway to use the ranking I have for www.aerlawgroup.com to help me rank higher for Los Angeles DUI lawyer for the dui interior page. If not, are there any other suggestions anyone has to achieve a higher ranking? Thanks!
Intermediate & Advanced SEO | | mrodriguez14400 -
Pagination Question: Google's 'rel=prev & rel=next' vs Javascript Re-fresh
We currently have all content on one URL and use # and Javascript refresh to paginate pages, and we are wondering if we transition to the Google's recommended pagination if we will see an improvement in traffic. Has anyone gone though a similar transition? What was the result? Did you see an improvement in traffic?
Intermediate & Advanced SEO | | nicole.healthline0 -
Duplicate content question? thanks
Hi, Im my time as an SEO I have never come across the following two scenarios, I am an advocate of using unique content, therefore always suggest and in cases demand that all content is written or re-written. This is the scenarios I am facing right now. For Example we have www.abc.com (has over 200 original recipes) and then we have www.xyz.com with the recipes but they are translated into another language as they are targeting different audiences, will Google penalize for duplicate content? The other issue is that the client got the recipes from www.abc.com (that have been translated) and use them in www.xyz.com aswell, both sites owned by the same company so its not pleagurism they have legal rights but I am not sure how Google will see it and if it will penalize the sites. Thanks!
Intermediate & Advanced SEO | | M_81