Hi.
On my Apache Server, I have this structure to host a website under '/' and a WordPress blog under '/myblog' directory:
--- root_directory/.htaccess
--- root_directory/php_stuff
--- root_directory/myblog/.htaccess
--- root_directory/myblog/php_wp_stuff
Within 'root_directory/.htaccess' file I have several RewriteRules:
--------
RewriteRule ^item/([^/]+)/ /item.php?label1=$1 [L]
RewriteRule ^([^/]+)/([^/]+)/$ /category.php?label1=$1&label2=$2 [L]
-----------------------
which work with
However, if I try to access
I got a 404 error. So I modififed the .htaccess:
------------------
RewriteRule ^myblog - [L,NC]
RewriteRule ^item/([^/]+)/ /item.php?label1=$1 [L]
RewriteCond %{REQUEST_URI} !^/myblog/
RewriteRule ^([^/]+)/([^/]+)/$ /category.php?label1=$1&label2=$2 [L]
-------------------
I tried to avoid 'myblog' directory to be ruled by the 'RewriteRules'. However, it works with
What am I doing wrong? I also tried by adding these lines at the bottom of .htaccess, but I does not work:
--------------
RewriteBase /myblog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /myblog/index.php [L]
--------------------
Any tip is welcome. Thank you very much.