Forum Moderators: phranque
I have two scripts installed with a .htaccess file each, one script on the main domain , the other in a folder.
www.site.com
www.site.com/blog
Tha htaccess file from the main domain is blocking the htaccess file from subdomain . I got the ideea from someone that i should add new lines in the htaccess from the main domain:
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{REQUEST_FILENAME} !-f
++
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ navigation.php
++
RewriteRule .* - [E=HTTP_X_REQUESTED_WITH:%{HTTP:X-Requested-With}]
Where ++ is i should add some extra code .
Please help me on what that code should be .
RewriteCond $1 !blog/
RewriteCond $1 !navigation\.php$
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.
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]