简体   繁体   中英

wordpress multisite with sub-domain pretty permalinks

i am trying to set up a wordpress (3.4.2) multisite. The current site already has the following apache rules applied, which i do not have the permissions to edit

<VirtualHost xx.xx.xx.xxx:80>
  ServerName foo.example.nl
  ServerAlias www.foo.example.nl
  DocumentRoot /web/sites/example.nl/foo/www
  RewriteEngine On
<Location />
  Allow from all
</Location>
</VirtualHost>

this works fine however i found that trying to set up permalinks with 'Post name' options always gives me a 404 redirect. http://foo.example.nl/post1 = 404 Not Found

at the moment i have un-installed multisite just to try and get the pretty urls working with the sub-domain but after trying lots of different variations of my .htaccess but nothing seems to be working. here is the current .htaccess wordpress generates:

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

Unfortunately you are probably limited from using .htaccess to configure the RewriteRules . If you referent to the Wordpress documentation on Using "Pretty" Permalinks you will see that you need to have Options FollowSymLinks enabled as well as AllowOverride Fileinfo or AllowOverride All to be able to use the pretty URL configuration in .htaccess . Since these don't seem to be set your <VirtualHost> it is likely your problem, since they are typically not set at a higher level in the Apache configuration.

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