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
-
Question regarding Site and URL structure + Faceted Navigation (Endeca)
We are currently implementing the SEO module for Endeca faceted navigation. Our development team has proposed URLs to be structured in this way: Main category example: https://www.pens.com/c/pens-and-writing/ As soon as a facet is selected, for example "blue ink" - The URL path would change to https://www.pens.com/m/pens-and-writing/blue-ink/_/Nvalue (the "N" value is a unique identifier generated by Endeca that determines what products from the catalog are served as a match for the selected facet and is the same every time that facet is selected, it is not unique per user). My gut instinct says that this change from "/c/" to "/m/" might be very problematic in terms of search engines understanding that /m/pens-and-writing/blue-ink/ as part of the /c/pens-and-writing/ category. Wouldn't this also potentially pose a problem for the flow of internal link equity? Has anyone ever seen a successful implementation using this methodology?
Intermediate & Advanced SEO | | danatanseo0 -
Taxonomy question - best approach for site structure
Hi all, I'm working on a dentist's website and want some advice on the best way to lay out the navigation. I would like to know which structure will help the site work naturally. I feel the second example would be better as it would focus the 'power' around the type of treatment and get that to rank better. .com/assessment/whitening
Intermediate & Advanced SEO | | Bee159
.com/assessment/straightening
.com/treatment/whitening
.com/treatment/straightening or .com/whitening/assessment
.com/straightening/assessment
.com/whitening/treatment
.com/straightening/treatment Please advise, thanks.0 -
DA vs Relevancy - Trade Off Question
Hey Guys We all know that relevancy largely trumps DA nowadays. What I am wondering is if there is a DA 'level' at which relevancy doesn't really matter - you probably still want a backlink from that site... For example, sites with DA of 100 we probably want backlinks from. So where do you draw the line? What I mean is for a high DA 'non relevant' site, what DA is 'acceptable' where you start to disregard relevancy? I'm thinking something like 70 and above would like some other thoughts... Obviously you would still be building relevant links too, developing content to do so and all that good stuff. I am just wondering what DA I should focus on for building non-relevant links ALONGSIDE relevant links 🙂 Thanks
Intermediate & Advanced SEO | | GTAMP0 -
Ecommerce Rich Snippets Category Question
Hello Technical question: I have category pages in my site - and product pages in my site. Category Pages I Have listed Grouped products on them ( i.e. a product that could have multiple offers for each size ) I Have the relevant markup for them ( one for each product ) . Product Pages The Product pages have grouped products as well - but the individual simple products are note marked up. The Product pages have Aggregate reviews on them. My question is this: Should I use the grouped product sku to identify the grouped product on the category page and the product page? Technically they aren't Stock Keeping Units ( SKU's ) - but they could be used to link the 2 together to avoid duplicates. Ideas?
Intermediate & Advanced SEO | | s_EOgi_Bear0 -
GWT url parameter issue/question
Hi Moz community, I'm having an issue with URL parameters in GWT. The tracking taxonomy for my websites is used as either /?izid=... (internal) OR /?dzid=... (external) I put tracking parameters in GWT as izid & dzid, but it hasn't picked up any URLs or examples in regards to these parameters. It's been about 2 months since we've started using this so I want to make sure Google isn't indexing as duplicate content. Side note: any page that uses a tracking parameter automatically adds rel="canonical" to the original page. Could this be the reason that GWT doesn't pick up any URLs for tracking parameters and/or do I not need to worry about adding paramters if I already have the canonical attribute automatically in place. Thanks for your help,
Intermediate & Advanced SEO | | IceIcebaby
-Reed0 -
Duplicate Content Question
Currently, we manage a site that generates content from a database based on user search criteria such as location or type of business. ..Although we currently rank well -- we created the website based on providing value to the visitor with options for viewing the content - we are concerned about duplicate content issues and if they would apply. For example, the listing that is pulled up for the user upon one search could have the same content as another search but in a different order. Similar to hotels who offer room booking by room type or by rate. Would this dynamically generated content count as duplicate content? The site has done well, but don't want to risk a any future Google penalties caused by duplicate content. Thanks for your help!
Intermediate & Advanced SEO | | CompucastWeb1 -
Link Building Question
Hi, I have a 2 month old blog with me, i have submitted a few press releases for the start, later in these 2 months, i got about 40 guest posts, which i've written and submitted at myblogguest site. My niche is in health. Currently my serps are at 16th page which is not a good position. I want to do more link building, but at myblogguest, no one are interested in my niche and don't want to publish content related to my niche, so it becoming hard for me to find guest blogs related to my niche. But i want to get more links in order for my blog to rank well. Is it ok if i write guest posts in other niches as well like technology and put a link in author's resource box? Does it become useful? please help as i find no other sources for my link building task, i tried researching for guest blogs in google also, but i don't find any related to my niche. Seems like, i cannot go further with my link building. Please help me. Thanks
Intermediate & Advanced SEO | | Vegitt
Dheer0 -
Rewriting URL
I'm doing a major URL rewriting on our site to make the URL more SEO friendly as well as more comfortable and intuitive for our users. Our site has a lot of indexed pages, over 250k. So it will take Google a while to reindex everything. I was thinking that when Google Bot encounters the new URLs, it will probably figure out it's duplicate content with the old URL. At least until it recrawls the old URL and get a 301 directing them to the new URL. This will probably lower the ranking of every page being crawled. Am I right to assume this is what will happen? Or is it fine as long as the old URLs get 301 redirect? If it is indeed a problem, what's the best solution? rel="canonical" on every single page maybe? Another approach? Thank you.
Intermediate & Advanced SEO | | corwin0