dallaslane — 2013-03-03T06:27:04-05:00 — #1
Hello Friends --
i created .htaccess file to solve canonical Issue. where i should put in my server. "what is Root ?" i am using godaddy server ...
please give me suggestion to solve problem
if any one know correct coding. please tell me my website made in HTML and ASP.net
ralphm — 2013-03-03T07:01:52-05:00 — #2
Hi dallaslane. Welcome to the forums.
where i should put in my server. "what is Root ?"
The root directory/folder of your site is the main, public container—the folder that contains all your public files—which basically means the folder where your site's home page is located. An htaccess file that is placed there applies to all pages in the site.
picnictutorials — 2013-03-03T09:01:50-05:00 — #3
On my server the root is in public_html. Here is the code your looking for. http://www.websitecodetutorials.com/code/htaccess/canonicalization-htaccess-mod_rewrite-301-redirect-non-www-to-www-and-index-to-folder.php
To edit your htaccess just change it to htaccess.txt and edit with notepad. Then change it back to .htaccess before uploading.
dallaslane — 2013-03-05T04:48:37-05:00 — #4
dklynn — 2013-03-05T17:28:29-05:00 — #5
Both Ralph and Eric gave answers to your question but they may be moot depending upon:
If you're using .asp files, there is an Apache module for that but it's better hosted on a WinDoze server (in the IIS family). Please confirm that you're using an Apache server as different members of the IIS family treat mod_rewrite quite differently (as M$ is trying to emulate this great Apache module).
Is GoDaddy now allowing you to use mod_rewrite within .htaccess? A few years ago, they had not (and that was only a small part of their reputation as a VERY BAD host - balancing their reputation as a very good domain name registrar).
In any case, you may want to run through the test of both .htaccess and mod_rewrite I have in my signature's tutorial to be sure it's available to you.