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
-
Rewriting content dilemma? should i include keywords ?
hi, i am rewriting content since it had 300 words , lower than top 10s i did some keywords research, on ahrefs, moz, keywordtool . io, semrush. and there are lot of variations like, main keyword is (ios 12) has variations like (ios 12 download), (ios 12 install), (ios 12 not supported) and so on, people have been searching all these terms with ios 12, it feels like if my page talks about all these variations. i have more chances to rank. does it make any sense?
Intermediate & Advanced SEO | | SIMON-CULL0 -
Question about Topics and subjects of sentences
Hello, This might be a bit of technical question but how is google linking entities together ? I understand that when writing a piece of content I need to cover multiple topics (which are also entities as far as I understand). Then, in order for google to link multiple entities together my guess is that my sentence needs to be written in subject, predicate, object format ? where my topic / entity comes out as the subject of the sentence. For example if I write that: "Tuscany is a famous for it's rolling hills?, here the subject is Tuscany which is what I want as it one of the topics I want to cover. But let's say that instead I write:" Rolling hills is something you find everywhere in Tuscany". Here Tuscany doesn't help because it isn't a subject and is just dropped there, correct ? Concerning the attributs of my entities (the object), does google have a list of what is right of wrong. For example if I say that Washington is the capital of italy ? can I be penalised for that ? I guess this is called entity disambiguation ? If the capital of italy would also be called Washington I believe that I would be ok but see that it isn't, can it hurt ? Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Sitemap and content question
This is our primary sitemap https://www.samhillbands.com/sitemaps/sitemap.xml We have a about 750 location based URL's that aren't currently linked anywhere on the site. https://www.samhillbands.com/sitemaps/locations.xml Google is indexing most of the URL because we submitted the locations sitemap directly for indexing. Thoughts on that? Should we just create a page that contains all of the location links and make it live on the site? Should we remove the locations sitemap from separate indexing...because of duplicate content? # Sitemap Type Processed Issues Items Submitted Indexed --- --- --- --- --- --- --- --- --- 1 /sitemaps/locations.xml Sitemap May 10, 2016 - Web 771 648 2 /sitemaps/sitemap.xml Sitemap index May 8, 2016 - Web 862 730
Intermediate & Advanced SEO | | brianvest0 -
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 -
301 or Canonical - Ecommerce Site Question
We are making a change to our Navigation and this includes having to change the URL structure of a few pages of our site. Due to issues with the CMS (that are out of my control) we are unable to keep the current URL structure of two of our highest ranking pages. Our site is an E-commerce Site The Structure is changing from..... www.domain.com/page/highrankingpage <----OLD PAGE RANKED WELL to www.domain.com/category/highrankingpage <----NEW PAGE Generally I would have 301 'd this page but I found out that our Tech team added a Canonical to this page instead....(showing the high ranking page to the Search Engines) and on our site the visitors are able to browse the website getting the new page. BOTH PAGES ARE BASICALLY IDENTICAL (Same Content) http://searchenginewatch.com/sew/how-to/2288690/how-and-when-to-use-301-redirects-vs-canonical# Thoughts?
Intermediate & Advanced SEO | | CMcMullen0 -
Newly Acquired Website--Questions on Changing Permalink Structure
I just acquired a new website. The domain is about 7 years old with around 1000 indexed pages in google. Decent domain authority at 34, PR 4, a lot of inbound links. The thing that's driving me crazy is the permalink structure--set up as month/post name in wordpress http://xxxxxxx.com/2015/01/sample-post/ Based on my experience and I could be wrong, but I would think that the structure would be more effective with just post name and no date. Am I absolutely insane at this point to try and change it?
Intermediate & Advanced SEO | | tryfantasy0 -
Site changes lead to big questions
I'm making some changes to my business that will cause me to move my blog to a new domain. The existing site will serve as a sales campaign for our full service programs and I want to keep visitors focused on that campaign. The old site will serve much like a mini site with a sales letter and video sales letter. In moving the blog content to another page - I found a post from Rand from a few years ago http://www.seomoz.org/blog/expectations-and-best-practices-for-moving-to-or-launching-a-new-domain. The way I wanted to approach this was to remove the content from the old site, and then resubmit the site map to Google for indexing. Of course they'll notice that the blog pages are gone. (probably a load of 404's) After perhaps a week, I'd repost the content (about 50 posts) on the new domain, which will be little more than a blog. I'd like some input on the way to approach this. Should I... a) Follow Rand's formula? b) Go with my idea (sort of the brute force model)? c) Consider an alternative method? It's probably worth mentioning that none of these posts have high search engine rankings. I appreciate your input Mozzers!
Intermediate & Advanced SEO | | sdennison0 -
What Questions Should I Be Asking?
I just read a discussion that was originally posted by Steve Ollington on May 22, 2011 where he states that many people are asking the wrong types of questions on this forum. He said that he wonders if he will see a shift from people asking questions on "how to rank" to questions dealing with "how to work out the best KPIs" (Key Performance Indicators - yes I had to google it). I was once told we learn more by asking questions about a topic than by just listening. I've also been told that sometimes the right question to ask is, "What questions should I be asking?" So here is my question, what types of questions should I be asking to be better at SEO? Perhaps these are some of them: Is it possible to be good at SEO when it is not a full-time job? It is very tempting to look for easy answers when you only have limited time. What are considered KPI's? Are they different for every industry? How do you know what is junk information vs what is truly good SEO advice? Is it just simply trial and error? It seems to me that if people find truly good SEO information, they aren't going to be sharing it so easily. It's the whole, "You get what you pay for". Maybe some of you can tell me more of the questions I should be asking.
Intermediate & Advanced SEO | | kadesmith1