The requested URL xxx was not found on this server

6,224

Solution 1

The htaccess file that you have must be in the /stellar/ folder. Assuming that it is, you have an error in the last rule:

RewriteRule ./stellar/index.php [L]

You're missing a space between the . and the /:

RewriteRule . /stellar/index.php [L]

And because of the rewrite base, you don't need the /stellar/ part at all:

RewriteRule . index.php [L]

Solution 2

@user3234280 Everything is fine, If you have exactly what i have you should have no problems at all!

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /wp_home/
 RewriteRule ^Pattern /wp_home/Substitution [QSA,L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /wp_home/index.php [L]
 </IfModule>

where /wp_home/ is WordPress' home directory (or the root URL / if WordPress is installed in your web root.)

If you need anymore help check out http://codex.wordpress.org/Class_Reference/WP_Rewrite

make sure you have this also included somewhere in your html or php

<?php
    $wp_rewrite->non_wp_rules = array( 'Pattern' => 'Substitution' );
    print_r($wp_rewrite->mod_rewrite_rules());
?> 
Share:
6,224

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have been tearing my hair on this for hours..please help..

    I have been running several websites on localhost for months without a hitch. Unfortunately last week I had do do a fresh instal of Windows due to a disk corruption. I now find that i get the dreaded "The requested URL /stellar/about-us/ was not found on this server" when I try to access any of the menu links. The Homepage works fine.. its menu links that do not work.

    I have changed the httpd.conf as follows: LoadModule rewrite_module modules/mod_rewrite.so

    .htaccess is also fine too. Reproduced below

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

    What have I missed? Please help!!!

  • Admin
    Admin over 10 years
    The only line that I do not have is: RewriteRule ^Pattern /wp_home/Substitution [QSA,L]
  • Admin
    Admin over 10 years
    You might or might not need this for this to work, but if you havnt already add this to your html or php look in the edited text i just posted
  • Admin
    Admin over 10 years
    Thanks. I have now fixed it. All I had to do was to re-save the Permalinks in Wordpress Admin portal even though I had not touched it. Thanks for the link to the reference.
  • Admin
    Admin over 10 years
    No problem, and Your Welcome! :)
  • Admin
    Admin over 10 years
    Thanks.. I saw that too and fixed it...even though I did not think it made a difference. Obviously, it did.