.htaccess / Wordpress Permalinks (url rewriting)

I'm running Drupal and Wordpress installs on my server. I can get url rewriting to work with .htaccess for my Drupal installs but not my Wordpress installs.

I believe I have my virtual hosts file set up properly, but what am I missing?

ServerAdmin webmaster@example.com

ServerName mhb.501clients3.com

ServerAlias http://www.mhb.501clients3.com

ServerAlias mhb.501clients3.com

DocumentRoot /srv/www/501clients3.com/clients3_new/mhb

ErrorLog /srv/www/501clients3.com/logs/error.log

CustomLog /srv/www/501clients3.com/logs/access.log combined

# This relaxes Apache security settings.

AllowOverride all

Options FollowSymLinks

MultiViews must be turned off.

Options -MultiViews

2 Replies

Not sure of the rest, but ServerAlias doesn't have http:// in it and you don't need to alias the same ServerName. Also, I am pretty sure you need to have all your options on one line.

 <virtualhost *:80="">ServerAdmin webmaster@example.com    ???
    ServerName mhb.501clients3.com
    ServerAlias www.mhb.501clients3.com
    DocumentRoot /srv/www/501clients3.com/clients3_new/mhb
    ErrorLog /srv/www/501clients3.com/logs/error.log
    CustomLog /srv/www/501clients3.com/logs/access.log combined
    <directory srv="" www="" 501clients3.com="" clients3_new="" mhb=""># This relaxes Apache security settings.
        AllowOverride all
        Options FollowSymLinks -MultiViews</directory></virtualhost> 

Not seeing your .htaccess it is hard to tell if you are turning on the rewrite engine etc…

It looks like the message board added the 'http://', please disregard.

This is the htaccess file:

BEGIN WordPress

RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

END WordPress

I've got the correct owner and permissions set on the htaccess file too.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct