Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default How can I change the directory to a subdirectory?

    I have an oscommerce webiste now. I gonna to install a zen cart to this website, too. I want to make oscommerce and zencart work together. One way is add the zencart to a subdirectory. But it will became to be, www.domain.com/subdirectory/index.php , i want to cancel the /subdirectory/ at the URL, is it possible? What can i do for this?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How can I change the directory to a subdirectory

    If your server is running Apache you can re-write your URLs in an .htaccess file using mod-rewrite to hide the subdirectory name.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: How can I change the directory to a subdirectory

    Quote Originally Posted by kuroi View Post
    If your server is running Apache you can re-write your URLs in an .htaccess file using mod-rewrite to hide the subdirectory name.
    So great! Can you tell me how to do this?
    I know nothing about the .htaccess

    Thank you so much!

  4. #4
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: How can I change the directory to a subdirectory

    I don't understand what you mean by "make oscommerce and zencart work together".

    If you mean you want to leave your osC site operational while you rebuild the site in Zen Cart, simply remove the osC folders and files from the root when you're done and move the Zen Cart folders and files to the root. There are instructions in the Tutorials/FAQ https://www.zen-cart.com/tutorials/i...hp?article=122.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How can I change the directory to a subdirectory

    Your server will need to have the apache mod rewrite module installed (most Linux servers do) in which case this should work for you, though I don't profess expertise in this area.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^yoursubfoldername/(.*)$ /$1 [R=301,NC,L]
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: How can I change the directory to a subdirectory

    Quote Originally Posted by kuroi View Post
    Your server will need to have the apache mod rewrite module installed (most Linux servers do) in which case this should work for you, though I don't profess expertise in this area.
    Hi, could you please tell me where should i put the .htaccess?
    At the root directory or the subdirectory

    But i tried both but it doesnt work. I don't know why, could you please help me ?

  7. #7
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default How to change .htaccess to rewrite the url? - Hard

    I add a zen cart store at subdirectory, so when i open the store, it is www.domain.com/paintings/index.php

    I want to cancel the /paintings/ at the URL, is it possible?
    lt will like www.domain.com/index.php

    I am using Ultimate SEO URLs, so i wonder whether can i Rewrite the URL to do so?

    For example, all codes on .htaccess for SEO URLs like this,

    RewriteRule ^print_page_p(.*)$ index\.php?main_page=print_page&products_id=$1&%{QUERY_STRING} [L]

    RewriteRule ^(.*)_p(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]

    Is it possible to base on the code of SEO URLs to cancel the subdirectory?

    Thanks

  8. #8
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How can I change the directory to a subdirectory?

    Quote Originally Posted by musicpxg View Post
    Hi, could you please tell me where should i put the .htaccess?
    At the root directory or the subdirectory
    It would go in whatever folder your hosting space is configured to send the URL.

    Alternatively, many hosts already have an option in the hosting control panel to say to what subdirectory an add-on domain, such as I think you're referring to, should be directed.
    Last edited by kuroi; 30 Jul 2009 at 09:37 AM.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  9. #9
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: How can I change the directory to a subdirectory?

    Quote Originally Posted by kuroi View Post
    It would go in whatever folder your hosting space is configured to send the URL.

    Alternatively, many hosts already have an option in the hosting control panel to say to what subdirectory an add-on domain, such as I think you're referring to, should be directed.
    My host is hostmonster, but i don't know what to do next.

    Thank you!

  10. #10
    Join Date
    Jul 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: How can I change the directory to a subdirectory?

    I solve this problem now!

    I just generate all of the oscommerce page into html pages, and then the problems about the includes document is nothing.

    Cheers!

    -----------------
    My blog http://www.ceruleangallery.com/blog/

 

 

Similar Threads

  1. How to change the domain directory?
    By hamidz in forum General Questions
    Replies: 3
    Last Post: 26 May 2010, 06:38 PM
  2. How do I change the directory of my zencart store?
    By Oseymour in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Aug 2009, 12:35 PM
  3. How do you change the directory for zen?
    By bfwdesigns in forum Basic Configuration
    Replies: 21
    Last Post: 16 Jul 2007, 07:44 AM
  4. Moving Zencart from Subdirectory to Main Directory
    By Jaeca in forum General Questions
    Replies: 1
    Last Post: 5 Jul 2007, 07:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg