• Resolved wpdau

    (@wpdau)


    Hello

    I’m new to WP.

    I restored my an existing WP instance (incl. pretty url’s, networking/multisite) on a new server, and it all worked fine, except the url rewriting didn’t work properly. I changed some configurations at my .htaccess file and the vhost file at /etc/apache2/sitesavailable/mysite.conf and suddently the page didn’t load at all anymore. Only a 403 Forbidden message is being thrown.

    I’m using ubuntu server and apache 2 with virtual hosts.

    content of .htaccess

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /var/www/html/wordpress/
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>

    Content of /etc/apache2/sites-available/mysite.conf

    <VirtualHost *:80>
            ServerAdmin your_email_address
            ServerName mysite.com
    
            DocumentRoot /var/www/html/wordpress/
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/html/wordpress/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
    </VirtualHost>

    thank you ??

Viewing 1 replies (of 1 total)
  • Thread Starter wpdau

    (@wpdau)

    restarted the server, now it works… maybe some service was not running? I don’t know..

Viewing 1 replies (of 1 total)
  • The topic ‘You don't have permission to access / on this server.’ is closed to new replies.