I have limited knowledge of .htaccess being used for rewriting urls, so I don't even know if this is where the problem lies. Situation: I installed PHP Weby (directory software) in a subdirectory on my server. I host a few websites on my hosting account so I linked the domain (www.directoryblak.com) to the subdirectory of /blak/. I then installed the PHP Weby software into a directory underneath that for testing, so the software was installed at /blak/blak/ (original, I know). So, after messing with the software for a few minutes I decided to make it live on my domain. I downloaded the files and reupped them to the root /blak/ directory and deleted the subdirectory /blak/blak/. Everything was working great until I tried to activate the 'Enable rewrite (SEO urls)' option within PHP Weby. With this activated a few links on my website still work, however, when a link doesn't work I get a 404 error like this one: Not Found The requested URL /blak/index.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. I'm assuming that the .htaccess file is rewriting the urls and looking for the files within the subdirectory still, however, I don't know how to (or if I even should) modify the .htaccess rewrite rules to make this work. I went through PHPmyadmin and looked for an entry that looked like /blak/ as it may have been holding it as the install directory and causing my problem, however, that was not the case. Any thoughts on this? I'd be happy to PM someone the .htaccess file contents if they think that is where the issue is. I decided to add the .htaccess file contents. I hope this doesn't give someone the ability to hack me.. :| -=-=-=-=-=-=-=-=-=- .htaccess file contents -=-=-=-=-=-=-=-=-=- ########################################################### # # * DO NOT REMOVE * # # Project: PHPWeby directory software version 1.2 # Url: http://phpweby.com # Copyright: (C) 2009 Blagoj Janevski - bl@blagoj.com # Project Manager: Blagoj Janevski # # For help, comments, feedback, discussion ... please join our # Webmaster forums - http://forums.phpweby.com # # License------------------------------------------------: # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # End License---------------------------------------------- # # # # # ########################################################### Options -Indexes Options +FollowSymLinks DirectoryIndex index.php <Files ~ "^(.*)\.(tpl|txt)$"> Order deny,allow Deny from all </Files> <IfModule mod_rewrite.c> RewriteEngine on #RewriteBase / RewriteRule ^[/]?latest-links.html$ index.php?l=l [NC] RewriteRule ^[/]?premium-links.html$ index.php?pm=l [NC] RewriteRule ^[/]?top-hits.html$ index.php?list=top [NC] RewriteRule ^[/]?contactus.html$ contactus.php [NC] RewriteRule ^[/]?linkus.html$ linkus.php [NC] RewriteRule ^[/]?detail/link[-]?([0-9]*)\.htm[l]?$ detail.php?id=$1 [NC] RewriteRule ^[/]?info/([0-9]*).*[\.]?[htm]?[l]?$ info.php?br=$1 RewriteRule ^(.*)/page[-]?([0-9]*)\.htm[l]?$ index.php?uri=$1&p=$2 [QSA,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ index.php?uri=$1 [QSA,L] </IfModule>
I had tried this in the past I believe, but I tried it again and no luck. In fact, I tried: /blak and it returned the same 404 error, "The requested URL /blak/index.php was not found on this server." I then tried /blak/ (just in case it needed the ending /) and I got the same error as before and as above. Then for kicks I tried /blak/shrimp/ just to see if it would change the error code and it didn't. I still got "The requested URL /blak/index.php was not found on this server." Thank you for your help, any other suggestions? Would you like to take a peek at the .htaccess file as it is now?
Find a .php file similar to config, it will contain a URL/path containing blak. Readjust that to fix the problem.
Thank you again for your reply. I thought of this also and loaded the website into Dreamweaver and did a sitewide find for blak (and many variations: /blak, /blak/...) and had no luck in finding anything. This was the first step before I started looking at the database entries in phpmyadmin for a /blak/ value. The bear of this is that it could be working properly, but loading the subdirectory /blak/ from the server as it is installed in a subdirectory for hosting purposes. Unfortunately, because I didn't name the install subdirectory something different, I cannot be certain. Thank you again for your assistance. If anyone else has any suggestions I would be happy to give them a shot.
No, I wasn't. I've gone through the MySQL database and I've done a text/html search of the site looking for any stray settings and I cannot find anything. Have any ideas?