简体   繁体   中英

Problem in apache2 with mod rewrite when setting rules in .conf files instead of .htaccess

Because of weird security policies of my hosting provider I have to define my rewrite rules in /etc/apache2/conf.d/examplesite.conf instead of writing them on an .htaccess on the www folder of that site.

What I'm trying to do is setup a Wordpress Mu server ( http://mu.wordpress.org/forums/topic/17349 ) and so far its working on a 50%.

The main blog loads perfectly but other sub blogs (located for example at www.example.com/blog2 ) don't.

I'm guessing the problem is that the rewrite rules behave differently when declared at .conf files for each virtual host instead of using .htaccess files.

Has anybody else had this problem? How can you fix it?

This doesn't sound like a rewrite problem to me but maybe it is. You don't say what the error is when you try to load one of the sub blogs. Perhaps posting up what your rewrite rule is would be helpful. Also would you be able to set up a scenario where you did them in .htaccess files on a localhost or something and seeing if there was a difference?

If pretty permalinks work, then mod_rewrite is enabled, and rewriting URLs to WordPress successfully.

If this is the case, then it's a problem with your MU install.

Did you choose paths over sub-domains during the MU install? If you didn't, but then later switched, that's where the problem is - are you in a position to fresh install?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM