PDA

View Full Version : Wordpress and mod-rewrite



xenith
08-12-2008, 06:19 PM
I have a couple domains hosted on my Westhost account, both of which are running Wordpress (yes, two separate installs; I'm not venturing into MU territory just yet).

The Wordpress on my main domain is able to output search engine friendly URLs without a problem, but I can't get the Wordpress install on my secondary domain to do this.

My main domain is, of course, located here: /var/www/html
and my secondary domain is here: /var/www/domain2

Is Apache on Westhost set up so that mod-rewrite only works for the directories located under /var/www/html? If so, how can I get it to work for my second domain? The default Wordpress ?p=130 URLs are just so ugly and useless.

wildjokerdesign
08-13-2008, 07:25 AM
It is not mod_rewrite that is the problem but the ability to us .htaccess files outside of /var/www/html. If you want your second domain to have the same basics (includeing the ability to use .htaccess) the open up /etc/httpd/conf/httpd.conf in a plain text editor and look for the VirtualHost directive at the bottom that pertains to your second domain. Inside of the VirtualHost directive add this:

<Directory "/path/to/public/directory">
Options FollowSymLinks MultiViews Includes ExecCGI
AddHandler cgi-script .cgi .pl .py .sh
AllowOverride All
Order allow,deny
Allow from all
</Directory>
You need to replace /path/to/public/directory with the path to your second domain. Restart your account via the Site Manager and you should be good to go.

xenith
08-13-2008, 09:55 AM
Thanks, Shawn! It worked like a charm.

:)

wildjokerdesign
08-13-2008, 11:40 AM
Your welcome.

MockTurtleneck
12-04-2008, 04:53 PM
Thanks, Shawn! It worked like a charm.

:)

Very helpful.. thx