skip to Main Content

I have a local WordPress website stored in localhost/wpdeal/ and it’s working well, here’s the content of it’s root .htaccess file :

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

When I moved the website to an online host (GoDaddy Windows Parallels Plesk) with "mydomain.com" and changed the .htaccess file accordingly to :

Options +FollowSymLinks -Multiviews
RewriteEngine on
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I’m getting a 404 error when I try to access to the website pages except for the home page. Is something wrong with my new .htaccess file? Did I miss something else? It’s been many hours that I’m struggling with that issue so any help will be highly appreciated!

Update: I’ve added a PHP script that check if mod_rewrite is enabled by the server :

<?php 
 if(!empty($_SERVER['HTTP_MOD_REWRITE'])){
     echo "Mod_Rewrite is running";
     } else {
     echo "Mod Rewrite is not running";
 }
?>

The response is : “Mod Rewrite is not running” .

2

Answers


  1. Search and replace is indeed the way to go, don’t manualy edit the htacess file.

    Login or Signup to reply.
  2. Parallels Plesk for Windows supported only Microsoft Internet Information Services (IIS), so you need to create web.config in httpdocs with similar content from the article http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search