WordPress.org

Ready to get started?Download WordPress

Forums

.htaccess rule for each sub wp sites (10 posts)

  1. littleantz
    Member
    Posted 3 years ago #

    Hi,

    Does each sub sites has its own root folder? I tried looking at the ftp folders and it does not seems to have seperate root folders.

    How can I have .htaccess rules for each sub sites on a WP network?

    thanks

  2. Roy
    Member
    Posted 3 years ago #

    Subsites get no folders of their own, these sites are actually virtual. Why would you want htaccess rules per subsite?

  3. littleantz
    Member
    Posted 3 years ago #

    I will use each sub sites to represents our multi language website.

    es.mydomain.com for spanish
    en.mydomain.com for english and so on...

    I used to use .htaccess rule to block entries to each website. so for es.mydomain.com, i should put .htaccess rules so that only spanish speaking countries can access the site. non spanish will be redirected to the main wp site where then can choose appropriate language.

    thanks for your reply.

  4. Roy
    Member
    Posted 3 years ago #

    Wow, that's beyond me. I'm afraid that you'll have to put all that in one htaccess files. Hopefully some multisite raven knows the answer.

  5. Roy
    Member
    Posted 3 years ago #

    Aha, Andrea online!

  6. I used to use .htaccess rule to block entries to each website. so for es.mydomain.com, i should put .htaccess rules so that only spanish speaking countries can access the site. non spanish will be redirected to the main wp site where then can choose appropriate language.

    I believe you can still do that BUT I would suggest you not.

    Why? Cause last time I went to Japan, I wanted to shoot Google for redirected me to Google in Japanese and not having an easy way for me to get back to English! A better way would be to make mydomain.com be a 'welcome' page with flags per language and let users pick-click where they wanna be, like Wikipedia.

    http://www.wikipedia.org/

  7. Aha, Andrea online!

    I defer to Ipstenu in all htaccess matters. ;)

  8. littleantz
    Member
    Posted 3 years ago #

    @Ipstenu, I completely agree with the method you are suggesting, however, my client demands on filtering the site based on geographical location.

    Is it possible?

  9. There are PHP and .htaccess scripts to do that. if you do it via .htaccess it's pretty complex and I've not messed with it in years, so my info's out of date.

    Resources:
    http://wordpress.org/extend/plugins/geoposty/
    http://www.ip2country.net/geo-targeting/geo-targeting.html

  10. littleantz
    Member
    Posted 3 years ago #

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic