url rewrite not working after changing site url

Because we want to launch the website, I had to change the site url from devdom.com to livedom.com, the start page loads fine, but I can’t load other pages, unless I deactivate pretty url/permalink settings! It used to work fine, before I changed the site url. If I use any permalink setting, the server will throw me a 404 not found message.

What I did:

Read More

the content of my .htaccess is:

# WordPress
RewriteEngine On
RewriteBase /
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]
# Media Library
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
# Disallow access to important files
<FilesMatch "(^.|wp-config.php|xmlrpc.php|(?<!robots).txt|(liesmich|readme).*)">
Order deny,allow
Deny from all
</FilesMatch>
# Prevent Directory Listings
Options -Indexes

I’m using apache on an ubuntu server, the wordpress version is 4.0.

Hope sb of you guys can help me, would appreciated it.

Thank you,

Ronin

****** UPDATE ******

  • I’m not sure if it matters, but it’s a network/multisite installation.
  • also, I set the ServerName Directive to www.livedom.com on the vshost file /etc/apache2/sites-available/www.devdom.com.conf

Related posts

Leave a Reply

1 comment

  1. Yes, I made it! On the same box there are various other pages, due using vhosts it’s possible to run all of those pages.

    Now, that’s what I came up with:

    • copied the old vhost config file to a new one: cp devdom.com.conf livedom.com.conf
    • registered the new vhost: a2ensite livedom.com.conf
    • unregistred the old vhost, removed the old vhost config file: a2dissite devdom.com.conf rm devdom.com.conf
    • restarted the rewrite module: a2dismod rewrite a2enmod rewrite

    after each step I restarted the apache service: service apache2 restart

    that did the trick for me 🙂