Magento Forum

   
Which file do I need to change to force “www” prefix in my address? 
 
BuzzKill
Jr. Member
 
Total Posts:  13
Joined:  2008-05-09
Portland, OR
 

Hi All,
The blog on this subject doesn’t specify which “.htaccess” file I need to change. Can someone please provide some guidance? My search resulted in the following files with said extension.
Thanks

/public_html/1_1_5_Install/lib/.htaccess

/public_html/1_1_5_Install/report/.htaccess

/public_html/1_1_5_Install/downloader/.htaccess

/public_html/1_1_5_Install/downloader/Maged/.htaccess

/public_html/1_1_5_Install/downloader/pearlib/.htaccess

/public_html/1_1_5_Install/downloader/template/.htaccess

/public_html/1_1_5_Install/pkginfo/.htaccess

/public_html/1_1_5_Install/app/.htaccess

/public_html/1_1_5_Install/var/.htacces

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

It’s most likely the .htaccess that’s in your 1_1_5_install directory (in the same directory as index.php).

Actually, you might try to create an .htaccess in your public_html folder for that purpose also.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BuzzKill
Jr. Member
 
Total Posts:  13
Joined:  2008-05-09
Portland, OR
 

Thanks for the info nikefido (You’re not from Portland are you?). I suspected that might be the one. I guess I was thrown a bit because it’s pointing to my Wordpress site. Any idea how I might change the following code to point it to my shiny new store instead?

My address is http://www.buzzfactoryinc.com if it matters…
Thx
Buzzill
___________________________

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

You can just add this to your .htaccess in your root folder (www / public_html folder). If it’s a word press .htaccess, that’s fine - just add it on to the .htaccess file:

RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule 
^(.*)$ http://www.mysite.com/$1 [L,R=301]

Replace “mysite” with your actual URL.

NOTE: In the Admin section of your wordpress, go to Settings and make sure your Wordpress address URL and/or Blog address has the ‘www’ in the url- otherwise, wordpress attempts to rewrite the URL without the ‘www’ in it.

This should extend to your magento install.

If it does not, then edit the .htaccess in your root magento folder with the same .htaccess code (add ‘RewriteEngine on’ if it’s no in there already)

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top