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
-
Migration developer question
Hi Guys, We are in the process of migrating our website and are moving to: AWS/Elastic Beanstalk hosting and the only way to do a custom domain with a third-party (not Amazon) DNS Service is by setting up a CNAME that points to the EBS Instance. Do you think this will impact SEO performance in any way? Cheers.
Intermediate & Advanced SEO | | cerednicenko0 -
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 -
Redirecting external blog to main website blog - two questions I'm struggling with
Hiya Mozzers - I have a blog separate from main website which is duplicating the blog on the main website. This separate blog is duplicating the main website blog, so it needs to be closed down and redirected. There are some 200 pages of separate blog (identified via Screaming Frog). So I am suggesting the blog pages should be 301 redirected from the separate blog to the equivalent blog pages on the main website. Q1) Should the root domain of the separate blog be 301 redirected to the main www.mainwebsite.com/blog page, or to the root domain of the main website? Q2) Should the blog pages, which lack equivalent content on the main website, be 301 redirected to the main www.mainwebsite.com/blog page, or to the root domain of the main website? Thanks for your help on this one, Luke
Intermediate & Advanced SEO | | McTaggart1 -
Real Estate Site Question
I'm working on this site: www.aldodavico.com - who is a real estate agent in Miami. Any ideas/best practices for SEO for a site like this one? It's got about 500 pages. I've never deal with such a huge site before.
Intermediate & Advanced SEO | | mrodriguez14400 -
XML question - not finding all of the pages
When I run http://www.xml-sitemaps.com/ on my site, it doesn't find all of my pages. The pages do not have any no follows in them (I thought that was the original problem). Has this happened to anyone else? What is the solution?
Intermediate & Advanced SEO | | digitalops0 -
Questions about 301 Redirects
I have about 10 - 15 URLs that are redirecting to http://www.domainname.comwww.domainname.com/. (which is an invalid URL)The website is on a Joomla platform. Does anyone know how I can fix this? I can't figure out where the problem is coming from.
Intermediate & Advanced SEO | | JohnParker27920 -
301 Redirect question
Which is the best way to set up the 301 redirect on my main home page? http://horsebuggy.com to http://www.horsebuggy.com Or does it make a difference? Boodreaux
Intermediate & Advanced SEO | | Boodreaux0 -
Apache not directing to 404?
I have a PHP website that produces an actual page when /index.php/GarbageURL/MoreDirectories/Page.suffix/DirectoryAgain is typed in a browser. Why? How? For what purpose? The content and HTML is produced in the source, but the images and css are broken due to the location of the file, obvi. I don't understand what this default tendency is for.
Intermediate & Advanced SEO | | Bombbomb0