Two Mod Rewrites

Using mod_rewrite to handle various content issues

Two Mod Rewrites

Postby swapshop » Sun Mar 26, 2006 1:17 pm

Hello to all

Current we have one web site but have two mod rewrites running

1)RewriteRule
([a-zA-Z0-9]*)\.htm$ http://www.domain.com/classifieds2/detail.php?siteid=$1

This works fine on its on

Now we have installed wordpress and it has another mod rewrite

2) <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

Again this works well on its on

But together 2 seems to verwrite. I cant seem to get this to work together.

Can anyone point me in the right direction please
swapshop
 
Posts: 6
Joined: Thu Nov 17, 2005 6:58 pm

Postby richardk » Tue Apr 11, 2006 11:32 am

Try this:
Code: Select all
RewriteEngine On

RewriteRule ^([^\./]+)\.htm$ /classifieds2/detail.php?siteid=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog(/.*)?$ /blog/index.php [L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Content

Who is online

Users browsing this forum: No registered users and 16 guests

cron