jdMorgan

msg:4060025 | 5:32 pm on Jan 13, 2010 (gmt 0) |
Exclude the blog subdirectory from the top-level .htaccess file rewrite rule:
RewriteCond $1 !blog/
You should also exclude "navigation.php" itself from that rule. Doing so will approximately double the speed of that rule, which is very slow since it has to go check the filesystem four times as it is now:
RewriteCond $1 !navigation\.php$
Move the "[E=" rule to the top, and then add an [L] flag to all the following rules. Jim
|
mircea1st

msg:4060124 | 7:08 pm on Jan 13, 2010 (gmt 0) |
Hi Jim . The way it looks after i did the changes : RewriteEngine on Options +FollowSymlinks RewriteRule .* - [E=HTTP_X_REQUESTED_WITH:%{HTTP:X-Requested-With}] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !blog/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !navigation\.php$ If i put [L] to the last 4 rules at the end it will give me a """Error 500:Internal Server Error """ The way it is now it's kind of the same as before . I must not be following your instructions as i should. Please tell me what can i change . Thank you Jim. Mircea.
|
jdMorgan

msg:4060139 | 7:36 pm on Jan 13, 2010 (gmt 0) |
> If i put [L] on the last 4 rules at the end it gives me a "500-Internal Server Error" There are only two rules in this file. The code should now look like this:
Options +FollowSymlinks RewriteEngine on # # Copy HTTP "X-Requested-With" header to similarly-named server variable RewriteRule .* - [E=HTTP_X_REQUESTED_WITH:%{HTTP:X-Requested-With}] # # Rewrite all requests for URL-paths which do not resolve to existing files or directories to # "/navigation.php", except for /blog requests and internal requests for "/navigation.php" itself RewriteCond $1 !^navigation\.php$ RewriteCond $1 !^blog/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ navigation.php [L]
Jim
|
mircea1st

msg:4060158 | 8:10 pm on Jan 13, 2010 (gmt 0) |
It will still take me to a PAGE NOT FOUND I did copy and paste of all the stuff above maybe it's because of something else. Thanks so much JIM. You think it's a different problem ?
|
g1smd

msg:4060165 | 8:15 pm on Jan 13, 2010 (gmt 0) |
Did you clear/delete the browser cache before testing again? What does "Live HTTP Headers" return for the test URL?
|
mircea1st

msg:4060174 | 8:29 pm on Jan 13, 2010 (gmt 0) |
I did the refresh and i get : blog/not_found.html I am checking out some other post here and testing , no results though.
|
mircea1st

msg:4060176 | 8:32 pm on Jan 13, 2010 (gmt 0) |
I'm sorry was i supposed to leave this part as it is or change something ? # Copy HTTP "X-Requested-With" header to similarly-named server variable RewriteRule .* - [E=HTTP_X_REQUESTED_WITH:%{HTTP:X-Requested-With}] #
|
mircea1st

msg:4060189 | 8:57 pm on Jan 13, 2010 (gmt 0) |
I found this one , for others worked ... It seems different from the way my rules are. <rewrite url=".*/blog/(.+)" to="$1" processing="stop" />
|
mircea1st

msg:4060220 | 9:37 pm on Jan 13, 2010 (gmt 0) |
Ok. So i got what you wrote above in domain .htaccess and added # RewriteBase / And in the other subdomain i added: RewriteBase /blog/ And that was it. Thanks soo much for your time Jim. Cheers. Mircea
|
|