.htaccess issues, help please? :)
-
Hey all, I am just installing wordpress on a site of mine.
I also run drupal on the site.
I am having issues getting re-write rules to work for both applications.If I put the wordpress rewrites at the top then wordpress works, if I put the drupal ones at the top then drupal works.
Is there anyway to edit the below code so that there is essentially an “else” clause going on so that if it is a wordpress page it will use one set and if it is a drupal page it will use another?
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /# Rewrite old-style URLs of the form ‘node.php?id=x’.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index2.php?q=node/view/%1 [L]# Rewrite old-style URLs of the form ‘module.php?mod=x’.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index2.php?q=%1 [L]# Rewrite current-style URLs of the form ‘index2.php?q=x’.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index2.php?q=$1 [L,QSA]
</IfModule># $Id: .htaccess,v 1.66 2005/03/20 19:15:00 dries Exp $
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Many thanks,
David
- The topic ‘.htaccess issues, help please? :)’ is closed to new replies.