Mod Rewrite Help
-
I need some help with doing the Mod Rewrite on our htaccess file. Basically I've a URL like this :
www.example.co.uk/new-toy-search?keys=xbox
and I want to rewrite the URL into something else (such as new-toy-search-xbox.html)
Could someone please take me through the steps of how to do this? I've had a look at the Apache site but it's really confusing the way it's explained!
-
Thanks Adam - the generateit tool works like a charm! Bookmarked!
-
Here are two tools that may help you:
http://www.generateit.net/mod-rewrite/
http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml
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
-
Despite proper hreflang and lang attribute implementation using xml sitemaps, I'm seeing sitelinks from different countries. Any help please?
When someone searches for our brand in US, instead of only US links, users are served with canadian or iranian sitelinks. Despite we have properly implemented xml sitemaps with hreflangs, even we have implemented lang attribute in the head section of source code for every country. I'd be thankful for any advice.
Technical SEO | | eset0 -
Drupal SEO help - Duplicate content but very similar URLS?
Hi, This is a very strange problem and not sure how it has happened. I am adding packages to my website and a duplicate page & almost identical URL is being picked up by Google. E.g. the page I make is http://www.ukgirlthing.co.uk/hen-party/bristol-spa-rty-lunch-pampering-h... but then also appearing is http://www.ukgirlthing.co.uk/hen-party/bristol-spa-rty-pampering-hen-party. The node's are exactly the same, and if i edit one of them, the other also updates. You will notice that the URL's are almost exactly the same, except the words are re-organised slightly? Shall i just delete the URL alias of the duplicate entry or is there something else which is making this happen? These URL's are being picked up as duplicate content, although it's the same node! Hope you can help, Thank you!
Technical SEO | | Party_Experts0 -
Need Help writing 301 redirects in .htaccess file
SEOmoz tool shows me 2 errors for duplicate content pages (www.abc.com and www.abc.com/index.html). I believe, the solution to this is writing 301 redirects I need two 301 redirects 1. abc.com to www.abc.com 2. /index.html to / (which is www.abc.com/index.html to www.abc.com) The code that I currently have is ................................................... RewriteEngine On
Technical SEO | | WebsiteEditor
RewriteCond %{HTTP_HOST} ^abc.com
RewriteRule (.*) http://www.abc.com/$1 [R=301,L] Redirect 301 http://www.abc.com/index.html http://www.abc.com ...................................................... but this does not redirect /index.html to abc.com. What is wrong here? Please help.0 -
Duplicate index.php/webpage pages on website. Help needed!
Hi Guys, Having a really frustrating problem with our website. It is a Joomla 1.7 site and we have some duplicate page issues. What is happening is that we have a webpage, lets say domain.com/webpage1 and then we also have domain.com/index.php/webpage1. Google is seeing these as duplicate pages and is causing me some real SEO problems. I have tried setting up a 301 redirect but it wn't let me redirect /index.php/webpage1 to /webpage1. Anyone have any ideas or plugins that can be used to sort this out? Any help will be really appreciated! Matt.
Technical SEO | | MatthewBarby0 -
Mod Rewrite / .htaccess avoid duplicate content
I have been searching and testing for hours but cannot find a solution. I am able to get a URL to display with out the file exntension. i.e domain.com/file instead of domain.com/file.php The problem is both versions of the URL above work, therefore a duplicate content issue. How can I force the URL with the file extension not to resolve and give a 404 error? Or just redirect to the non extension URL? IF it helps here is my code. Options +FollowSymLinks
Technical SEO | | MiamiWebCompany
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ $1.php [L,QSA]0 -
Help removing duplicate content from the index?
Last week, after a significant drop in traffic, I noticed a subdomain in the index with duplicate content. The main site and subdomain can be found below. http://mobile17.com http://232315.mobile17.com/ I've 301'd everything on the subdomain to the appropriate location on the main site. Problem is, site: searches show me that if the subdomain content is being deindexed, it's happening really slowly. Traffic is still down about 50% in the last week or so... what's the best way to tackle this issue moving forward?
Technical SEO | | ccorlando0 -
Help internet archive
Hi can anyone help me. I am trying to track information from sites. I am at the moment got solicitiors involved ref trade mark of a name and we are trying to prove that this name was being used before the trade mark application. A company has gone ahead with a trade mark in full knowledge that this is a common name and we have been told if we can prove that the name was being used before it was registered then we can knock out the trade mark. We have been told there is an internet archive but i cannot find one, can anyone please let me know how i can look at sites from before 2010 and see about if they were using this word to help our case.
Technical SEO | | ClaireH-1848860 -
404 help
Hello all, firstly let me apologize if this is the wrong place to ask this question. I have a site www.promptresponseaccidentmanagement.com which gets a 200ok when checked for crawl issues, however pages such as /whiplash-injury-compensation-claims.php , /road-traffic-accident-compensation-claims.php and quite a few more return a 404. That's fine (usually) as I can quite happily fix that most of the time. However if you actually go to those pages in your browser, or click through to them on any part of the site you will see that they are in fact not redirecting to a 404 and everything is fine!? Any body got any ideas? Best H
Technical SEO | | haydyn0