.htacess file format for Apache Server
-
Hi,
My website having canonical issue for home page, I have written the .htaccess file and upload the root directory. But still I didn't see any changes in the home page. I am copying syntax which one I have written in the .htaccess file. Please review the syntax and let me know the changes.
Options +FollowSymlinks RewriteEngine on #RewriteBase /
re-direct index.htm to root / ### RewriteCond %{THE_REQUEST} ^./index.htm\ HTTP/ RewriteRule ^(.)index.htm$ /$1 [R=301,L]
re-direct IP address to www ### re-direct non-www to www ### re-direct any parked domain to www of main domain RewriteCond %{http_host} !^www.metricstream.com$ [nc] RewriteRule ^(.*)$ http://www.metricstream.com/$1 [r=301,nc,L]
Is there any specific htaccess file format for apache server?
Thanks,
Karthik
-
Hi Karthik,
I'd recommend posting a new Q&A question about this, as this is now a few months old and a bit buried. You might hold off until Tuesday US time, since we have a holiday tomorrow and there won't be nearly as many people online.
When you do write your question, it would be helpful to add to your post what types of errors you get when you try to implement this -- just what you have tried, and what the results are.
I also see that your site doesn't redirect non-www to www. If you want to fix that too, now would be a good time to ask about it.
Keri
-
Hi Keri,
Thanks for your message. I didn't find solution for the redirection. It would be great if you help me to fix that issue. How we can do the SEO friendly redirection (301) in tomcat server?
Karthik
-
Hi! I'm following up on older Q&A questions. Did any of the resources from the earlier post help you out, or is there anything we can do to help you get this redirect implemented?
-
Hi, there is something: http://httpd.apache.org/docs/1.3/howto/htaccess.html, A tutorial: http://www.freewebmasterhelp.com/tutorials/htaccess/1
And some examples here:
http://knowledge.freshpromo.ca/seo-tools/301-redirect.php
http://www.seo-consultant-services.co.uk/301-redirects-www-non-www-canonical-problems.html
http://www.dailyblogtips.com/how-to-setup-a-301-redirect/
http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm
First example best describes what you need, cannonical redirect
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
-
Is it possible to export Inbound Links in a CSV file categorized by Linking Root Domains ?
Hi, I am performing an analysis of the total inbound links to my homepage and I would like to have the total amount of inbound links categorized by the Linking root domains. For example, the Open Site explorer does offer the feature to show you the Linking Root Domains to your page. Then when you click on the first Linking Root Domain, it also shows you the Top Linking Pages ( Which means all the pages that link to your page from this particular top level domain) Now I would like to export this data to a CSV file, but open site explorer only exports the total amount of top level linking domains. Does anyone has a solution to this problem ? Thank you very much for the help in advance!
Technical SEO | | Feweb0 -
Best way to fix a whole bunch of 500 server errors that Google has indexed?
I got a notification from Google Webmaster tools saying that they've found a whole bunch of server errors. It looks like it is because an earlier version of the site I'm doing some work for had those URLs, but the new site does not. In any case, there are now thousands of these pages in their index that error out. If I wanted to simply remove them all from the index, which is my best option: Disallow all 1,000 or so pages in the robots.txt ? Put the meta noindex in the headers of each of those pages ? Rel canonical to a relevant page ? Redirect to a relevant page ? Wait for Google to just figure it out and remove them naturally ? Submit each URL to the GWT removal tool ? Something else ? Thanks a lot for the help...
Technical SEO | | jim_shook0 -
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 -
How do you know when to upgrade hosting to VPS or Dedicated Server from an SEO perspective?
From an SEO perspective, how do you know when to upgrade web hosting to VPS or Dedicated Server? Added: We have a Dedicated IP Address and plenty of bandwidth and disk space. We've done a lot of work on page speed. What we don't need is slow-downs due to the sharing space. Our business is seasonal with much higher traffic for three months of the year. I'm leaning towards moving it up a notch. What is the next level after this? And yes, our web host just confirmed that some of the things I want to implement can't be done because we are on a shared server. He recommended going to Dedicated Hosting. And finally: If we want to be absolutely positive that shared hosting problems won't affect us, and to customize, and also to increase speed, dedicated server seems to be the way to go?
Technical SEO | | zharriet0 -
Adding Wordpress On Separate Server w/ subdomain = SEO Issues?
I have a client that wants to setup wordpress for their business site. However, they are really concerned about the load time a wordpress install creates on their site in the root. So, they want to setup wordpress with a sub-domain on a separate server. For example: abc.domain.com As far as SEO is concerned with the main site, what are the advantages and disadvantages for using a separate server w/ subdomain?
Technical SEO | | VidenMarketing0 -
Redirects on Window Servers - .htaccess equivalent for IIS
I am going to start searching myself, but I have a client on a Windows server needing to do redirects. So besides my usual 'Get a UNIX box', I need to know how to do redirects on IIS. Full site redirect: RewriteCond %{HTTP_HOST} ^[site].com [NC] RewriteRule (.*) http://www.[site]/$1 [L,R=301] as well as page level redirects redirect 301 /[old-page.php] http://www.[site].com/[new-page] And that leads me to the question of RewiteRules also? RewriteRule ^[requested-page].html [server-fed-page].php [L] Thanks if anyone can [redirect] me to a good URL for these. 🙂 Richard
Technical SEO | | Getz.pro0