Htaccess mod rewrite from server address
-
Hi there,
I'm not massively experienced with creating mod rewrite rules and I'm worried I've got this wrong as its slightly different to what I'm used to.
The web dev and content creators were working on http://5.10.105.45/~isea/ to create content.
I want to redirect all URL's to www.iseasurfwear.co.uk. This is what I've written
//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^5.10.105.45/~isea/[nc]
RewriteRule ^(.*)$ http://www.iseasurfwear.co.uk/$1 [r=301,nc]Can anyone tell me if this is correct?
-
Try
RewriteEngine On
RewriteCond %{HTTP_HOST} ^5.10.105.45/~isea/
RewriteRule ^(.*)$ http://www.NewDomain.com/$1 [R=301,L]Or
RewriteEngine On
RewriteCond %{HTTP_HOST} /~isea/$
RewriteRule ^(.*)$ http://www.NewDomain.com/$1 [R=301,L]** (edit) Make sure your sever has Mod Rewrite Enabled*
-
Agreed, but for now I just want to cover the issue so we can move forward. Slight update to my code. This rewrites the homepage, but doesn't seem to be rewriting anything else. Any tips?
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^5.10.105.45/~isea/ [nc]
rewriterule ^(.*)$ http://www.mydomain.com/$1 [r=301,nc] -
If you're moving from a dev environment to live, it's not redirects that you need. You need to update the references in the code of the template and in the content areas that your developers didn't clean up when moving the site to live. Doing rewrites will only cover the issue, but the incorrect links will still be there.
-
Just tested. It doesn't work. Any 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
-
Magento Rewrite Issue
Moz's Crawler has thrown up a bunch of crawl issue for my site.The site is a magento based site and I recently updated the themes so some routes may have have become redundant. Moz has identified 289 pages with Temporary Redirect. I thought magento managed the redirects if I set the "Auto-redirect to Base URL" to Yes(301 Moved permanently). But this is enabled on my store and I still get the errors. The only thing I could think of was to add a Robots.txt and handle the redirection of these links from here. But handling redirection for 289 links is no mean task. I was looking for any ideas that could fix this without me manually doing this .
Technical SEO | | abhishek19860 -
We are using Hotlink Protection on our server for jpg mostly. What is moz.com address to allow crawl access?
We are using Hotlink Protection on our server for jpg mostly. What is moz.com crawl url address so we can allow it in the list of allowed domains? The reason is that the crawl statistics gives our a ton of 403 Forbidden errors. Thanks.
Technical SEO | | sergeywin10 -
301 redirect .htaccess
Hi guys I am working on some 301 redirects on an apache webserver and I'd like a bit of assistance in trying to get a specific type result: I want all addresses from domaina.com to be redirected to domainb.com in the same structure so domaina.com/folder/file will go to domainb.com/folder/file expect for 2 folders.
Technical SEO | | seobackbone
ie: DomainA.com --> DomainB.com
except domainA.com/folder1
and domainB.com/folder2 Can someone let me know how I can pull this off?0 -
Would duplicate listings effect a client's ranking if they used same address?
Lots of duplication on directory listings using similar or same address, just different company names... like so-and-so carpet cleaning; and another listing with so-and-so janitorial services. Now my client went from a rank around 3 - 4 to not even in the top 50 within a week. -- -- -- Would duplication cause this sudden drop? Not a lot of competition for a client using keyword (janitorial services nh); -- -- -- would a competitor that recently optimized a site cause this sudden drop? Client does need to optimize for this keyword, and they do need to clean up this duplication. (Unfortunately this drop happened first of March -- I provided the audit, recommendations/implementation and still awaiting the thumbs up to continue with implementation). --- --- --- Did Google make a change and possibly find these discrepancies within listings and suddenly drop this client's ranking? And they there's Google Places:
Technical SEO | | CeCeBar
Client usually ranks #1 for Google Places with up to 12 excellent reviews, so they are still getting a good spot on the first page. The very odd thing though is that Google is still saying that need to re-verify their Google places. I really would like to know for my how this knowledge how a Google Places account could still need verification and yet still rank so well within Google places on page results? because of great reviews? --- Any ideas here, too? _Cindy0 -
How long to come back from a server outage?
We changed hosting companies two weeks ago, and we had a number of configuration issues that caused the site to go on and offline over that weekend. We fixed the problem but our traffic took a noticeable hit. I am assuming this is because our rankings dropped due to the site being down. Now that we're stable again, how long will it take for the traffic to return? is there anything I can do to speed up the process?
Technical SEO | | AmericanOutlets0 -
On a dedicated server with multiple IP addresses, how can one address group be slow/time out and all other IP addresses OK?
We utilize a dedicated server to host roughly 60 sites on. The server is with a company that utilizes a lady who drives race cars.... About 4 months ago we realized we had a group of sites down thanks to monitoring alerts and checked it out. All were on the same IP address and the sites on the other IP address were still up and functioning well. When we contacted the support at first we were stonewalled, but eventually they said there was a problem and it was resolved within about 2 hours. Up until recently we had no problems. As a part of our ongoing SEO we check page load speed for our clients. A few days ago a client who has their site hosted by the same company was running very slow (about 8 seconds to load without cache). We ran every check we could and could not find a reason on our end. The client called the host and were told they needed to be on some other type of server (with the host) at a fee increase of roughly $10 per month. Yesterday, we noticed one group of sites on our server was down and, again, it was one IP address with about 8 sites on it. On chat with support, they kept saying it was our ISP. (We speed tested on multiple computers and were 22MB down and 9MB up +/-2MB). We ran a trace on the IP address and it went through without a problem on three occassions over about ten minutes. After about 30 minutes the sites were back up. Here's the twist: we had a couple of people in the building who were on other ISP's try and the sites came up and loaded on their machines. Does anyone have any idea as to what the issue is?
Technical SEO | | RobertFisher0 -
Advice on SEO for videos on a streaming server
I am looking for some advice on video SEO when the video file is housed on a streaming server. An example page is below. The onlyvideo element on the page is a script reading in the filepath to the streaming server so I am not sure what the best course of action is. Currently, none of our videos are indexed. http://www.sei.cmu.edu/library/abstracts/webinars/Making-Agile-Work-for-You.cfm
Technical SEO | | SEI0 -
301 redirect .htaccess problem
Can anyone explain to me why this doesn't work? Redirect 301 /category/diamond-pendants/nstart/1/start/(.*) http://www.povada.com/category/pendants/nstart/1/start/$1 Im trying to replace everything after /start/ and insert it into the new url. Thanks in advance.
Technical SEO | | 13375auc30