Vaughn Performance Posted January 12, 2010 Posted January 12, 2010 Hey everyone, I am completely new to oscommerce, and well any typ of web design or anything for that matter. I have oscommerce uploaded now though, and am to the point where I'd like people to be able to reach the site without having to type the /catalog part in to get there. I've done this before, as I had a site previous to this that my "FORMER" web host managed to delete from their server, but can't remember how I did it as it was nearly two years ago. So basically I want to be able to type: www.vaughnperfomrance.com to be able to reach the site rather then www.vaughnperformance.com/catalog Thanks much in advance!!
♥mdtaylorlrim Posted January 12, 2010 Posted January 12, 2010 You have a couple of choices.... 1. Reinstall, but this time put it in root. 2. Backup your files, wipe your site, restore your files into root. Change configure.php files. 3. Put a redirect in your root directory. (Not search engine friendly.) 4. Point your domain to /catalog/. Change your configure.php files. Given a little research I could probably come up with the linux command to do this all at once, but you probably don't have access to do that... Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...?
Vaughn Performance Posted January 13, 2010 Author Posted January 13, 2010 Ok so I think options 3 and 4 are the most appealing to me. I believe I had my site redirecting before, and I'm not quite certain I understand which you mean by number 4. Like I said I dont really know much at all, but if you could explain to me how to do either of the last two options. Thanks much in advance!!
♥mdtaylorlrim Posted January 13, 2010 Posted January 13, 2010 Ok so I think options 3 and 4 are the most appealing to me. I believe I had my site redirecting before, and I'm not quite certain I understand which you mean by number 4. Like I said I dont really know much at all, but if you could explain to me how to do either of the last two options. Thanks much in advance!! #4 can only be done by your host. #3 is not search engine friendly, but often done. In your root directory put a default page that simply automatically redirects the visitor to the /catalog directory. My favorite is the .htaccess page with a rewrite rule. However, the /catalog/ will show in the URLs to your site. The only way to prevent that is #1 or #2. Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...?
Vaughn Performance Posted January 14, 2010 Author Posted January 14, 2010 #4 can only be done by your host. #3 is not search engine friendly, but often done. In your root directory put a default page that simply automatically redirects the visitor to the /catalog directory. My favorite is the .htaccess page with a rewrite rule. However, the /catalog/ will show in the URLs to your site. The only way to prevent that is #1 or #2. That's actually the part I need help with. Sorry, I'm not very good with any of this and not sure how to accomplish this.
♥mdtaylorlrim Posted January 15, 2010 Posted January 15, 2010 That's actually the part I need help with. Sorry, I'm not very good with any of this and not sure how to accomplish this. In your root directory create an index.php file with the following, and only to following contents. Change the URL to that of your shop/ <?php header( 'Location: http://www.vaughnperformance.com/catalog' ) ; ?> nevermind. I changed it for you... Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...?
Vaughn Performance Posted January 15, 2010 Author Posted January 15, 2010 In your root directory create an index.php file with the following, and only to following contents. Change the URL to that of your shop/ <?php header( 'Location: http://www.vaughnperformance.com/catalog' ) ; ?> nevermind. I changed it for you... Ok, so I believe I actually was able to accomplish option #2! I backed up the site, deleted what was uploaded, went into the admin/configure, and the includes/configure file and deleted all the things that said /catalog/. So now, you can go to www.vaughnperformance.com and no more /catalog! Yay!! But, new problem now is, if you type say a search for Vaughn Performance into Google, it will come up with the site, but, the link for it to click on in the search reads "index of/." If you type it into a search in google we should come up at the top of the page, and you'll see what I'm talking about. If you click on that link though, it will go to the web page. Any ideas?? Thanks much!! -Anthony
jdvb Posted January 15, 2010 Posted January 15, 2010 I think those are a bit ugly solutions, how about add an .htaccess to the root to rewrite? RewriteEngine On RewriteCond %{REQUEST_URI} !^/catalog/ RewriteRule ^(.*)/? /catalog/$1 et voila, your site if effectively moved to the root while all links used to /catalog/ will remain functioning. When you see that this works, and you actually get to see your show while visiting http://www.vaughnperformance.com/ do update the config so that links will point to the / instead of /catalog/ more tips about htaccess: corz.org
♥mdtaylorlrim Posted January 15, 2010 Posted January 15, 2010 Ok, so I believe I actually was able to accomplish option #2! I backed up the site, deleted what was uploaded, went into the admin/configure, and the includes/configure file and deleted all the things that said /catalog/. So now, you can go to www.vaughnperformance.com and no more /catalog! Yay!! But, new problem now is, if you type say a search for Vaughn Performance into Google, it will come up with the site, but, the link for it to click on in the search reads "index of/." If you type it into a search in google we should come up at the top of the page, and you'll see what I'm talking about. If you click on that link though, it will go to the web page. Any ideas?? Thanks much!! -Anthony Ok, no problem, really. What will now happen is that over time Google will re-index your site and everything will return to normal with your URLs absent of the /catalog/. But, as you can now see, in the meantime your site will not appear in the searches correctly until Google and the other search engines re-index your site. But there is a fix for that... However, the fix for this new problem with definitely require the .htaccess solution so that all direct links will find your site. Create an .htaccess file for your root directory, if you do not already have one. If you have one already simply add the following to the top of the contents. RewriteEngine On RewriteCond %{REQUEST_URI} ^/catalog/* RewriteRule ^/catalog/ /$1 I think that's right. If it does not work then someone here will surely fix it for us. I'm not that great at writing the rules. After the search engines gets your site re-indexed you can remove the rewrite rules or leave them there. It won't hurt anything. Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...?
jdvb Posted January 15, 2010 Posted January 15, 2010 RewriteEngine OnRewriteCond %{REQUEST_URI} ^/catalog/* RewriteRule ^/catalog/ /$1 $1 needs to be defined still: RewriteEngine On RewriteCond %{REQUEST_URI} ^/catalog/* RewriteRule ^/catalog/(.*) /$1
♥mdtaylorlrim Posted January 15, 2010 Posted January 15, 2010 $1 needs to be defined still: Oops..thanks. I don't do it often enough to remember those and usually I use someone else' known working rules. I have a particular issue with a rule right now. Mind if I PM you a request? Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.