0

I was really struggling to find the answer. When I moved my WordPress site from localhost to remote server my links are not working. It showing that:

The requested URL /project/investment was not found on this server.

I don't know what is the problem. I searched a lot, but I cant find the correct solution. I have created the menubar using the html rather than the WordPress nav menu.

Here is my .htaccess code

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /newsite.in/project/
RewriteRule^index\.php$-[L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./newsitein/project/index.php [L]
</IfModule>

I don't know how to change it. Can anyone please help me?

Marc
  • 4,661
  • 3
  • 40
  • 62

4 Answers4

0

You need to flush your Permalinks as Akshay stated.

To do this...

  • Go to Settings->Permalinks in your Wordpress Admin area
  • Scroll down and click Save Changes (even if you haven't changed anything).

They should now work.

It's a very common issue!

DevFox
  • 554
  • 2
  • 11
0

In such circumstances it usually helps to change the permalink structure in the backend, save, and change it back to whatever you'd like. This rewrites the .htaccess with the new link structure.

Also, there might be a typo in your htaccess on the second last line since line 3 and the second last line are different - the DOT.

RewriteBase /newsite.in/project/

vs

RewriteRule ./newsitein/project/index.php [L]
Tate83
  • 274
  • 1
  • 7
  • 21
0

You can do following steps:

  1. Check if mod_rewrite is enable on your server.You can visit this link
  2. When you moved your server make sure you update siteurl and home link
  3. Update the permalink from Settings->Permalinks on your wordpress dashboard

Also your permalink is not formatted properly i think.Here is my code

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /newsite.in/project/
RewriteRule^index\.php$-[L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./newsite.in/project/index.php [L]
</IfModule>

You missed a . on RewriteRule ./newsite.in/project/index.php [L]

Community
  • 1
  • 1
Maidul
  • 380
  • 3
  • 8
0

Step 1

Go to Settings => Permalinks

In Permalink Settings page

select post name and save it again ..and see if it's working. If not working go to step 2

Step 2

check httpd.conf

RewriteEngine on

Rewrite base is one of the importent thing that you need to check.. in below site it's root "RewriteBase / "

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

In youe case it should be "RewriteBase /newsite.in/" if your wordpress is located folder is located in newsite.in folder.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /newsite.in/
RewriteRule^index\.php$-[L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./newsitein/index.php [L]
</IfModule>

If this is not working , Go to step 3

Step 3

check your site folder structure..

to do that save below code to test.php and upload to site's root folder

 <?php phpinfo(); ?> 

browse it like http://sitename.com/test.php
seach "DOCUMENT_ROOT" , it should be display like below..


DOCUMENT_ROOT   /home/apache2/public_html

In this your WordPress folder should be in public_html

reference : http://www.online-ebooks.info/article/wordpress_Permalink_is_not_working_after_migration.html

  • thank you for your response. Its working now http://wordpress.org/support/topic/permalinks-error-please-help?replies=17 i have referred this link and its working now. – user3539727 May 03 '14 at 06:29