Rewrite advice

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Rewrite advice

Black Night Lists
Hi,

One of my clients and his designer have moved the bulk of the site over to wordpress for SEO purposes. However the directory part of the site is being affected by the Wordpress permalinks rewrite rules.

This was the old rewrite set up


RewriteRule ^NEW/.*$ - [PT,NC]
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/([_\ A-Za-z0-9-]+)/?$ directory.lasso?p=$1&area=$2&id=$3 [L]
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/?$ directory.lasso?p=$1 [L]

So domain/suppliers would rewrite to directory.lasso?p=suppliers

However when wordpress adds it's rewrite rules

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteRule ^NEW/.*$ - [PT,NC]
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/([_\ A-Za-z0-9-]+)/?$ directory.lasso?p=$1&area=$2&id=$3 [L]
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/?$ directory.lasso?p=$1 [L]

The directory listings fails with a 404 error.

In a nutshell I need a rewrite rule so that if the url starts with  Suppliers,  Services, In-Your-Area or B2B and anything else after those it should display directory.lasso otherwise show the wordpress pages.

For example domain/Suppliers/Area/ID etc

I have the file as follows which seems to work for the category but when I add for other redirect for the other parameters it all fails

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks


RewriteRule ^NEW/.*$ - [PT,NC]
RewriteCond %{REQUEST_URI} /Suppliers
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/?$ directory.lasso?p=$1 [L]

RewriteCond %{REQUEST_URI} /Services
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/?$ directory.lasso?p=$1 [L]

RewriteCond %{REQUEST_URI} /In-Your-Area
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/?$ directory.lasso?p=$1 [L]

RewriteCond %{REQUEST_URI} /B2B
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/?$ directory.lasso?p=$1 [L]
</IfModule>

## Wordpress Rules

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks

RewriteBase /
RewriteRule ^NEW/.*$ - [PT,NC]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

## End Wordpress Rules

Regards

Stephen Thirlwell
Black Night Software
LassoSoft Hosting Partner • Certified Lasso Developer
http://www.blacknight.co.uk







#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Rewrite advice

Black Night Lists
I guess no one has experience with this, so does anyone know of a forum/mailing list I can post this sort of question to?

Regards

Stephen Thirlwell
Black Night Software
LassoSoft Hosting Partner • Certified Lasso Developer
http://www.blacknight.co.uk







#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Rewrite advice

Jolle Carlestam-3
Shakespeare did a number of rewrites. Was on the whole very popular in those days since there were no copyright laws.
I believe it's also common in politics. You take some old speech and rewrite it just a smitten to suit new needs.
Not to mention all the rewriting that takes place in Hollywood. Has there been a truly new movie idea for decades?

HDB
Jolle

Sent from a thin, flat, touchy device from an undetermined place in space.

14 dec 2011 kl. 09:25 skrev "Black Night Lists" <[hidden email]>:

> I guess no one has experience with this, so does anyone know of a forum/mailing list I can post this sort of question to?
>
> Regards
>
> Stephen Thirlwell
> Black Night Software
> LassoSoft Hosting Partner • Certified Lasso Developer
> http://www.blacknight.co.uk
>
>
>
>
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Rewrite advice

detlef.hebbel
How many beers Jolle?

Re-writing dissertations are also very popular:)

Cheers
Detlef



On 14/12/2011, at 16:11, Jolle Carlestam <[hidden email]> wrote:

> Shakespeare did a number of rewrites. Was on the whole very popular in those days since there were no copyright laws.
> I believe it's also common in politics. You take some old speech and rewrite it just a smitten to suit new needs.
> Not to mention all the rewriting that takes place in Hollywood. Has there been a truly new movie idea for decades?
>
> HDB
> Jolle
>
> Sent from a thin, flat, touchy device from an undetermined place in space.
>
> 14 dec 2011 kl. 09:25 skrev "Black Night Lists" <[hidden email]>:
>
>> I guess no one has experience with this, so does anyone know of a forum/mailing list I can post this sort of question to?
>>
>> Regards
>>
>> Stephen Thirlwell
>> Black Night Software
>> LassoSoft Hosting Partner • Certified Lasso Developer
>> http://www.blacknight.co.uk
>>
>>
>>
>>
>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Rewrite advice

detlef.hebbel
In reply to this post by Black Night Lists
http://documentation.lassosoft.com/Lasso%208.5/002%20Setup%20Guide/004%20Site%20Administration/015%20URL%20Rewrite/index.lasso


Cheers
Detlef

On 14/12/2011, at 12:24, Black Night Lists <[hidden email]> wrote:

> I guess no one has experience with this, so does anyone know of a forum/mailing list I can post this sort of question to?
>
> Regards
>
> Stephen Thirlwell
> Black Night Software
> LassoSoft Hosting Partner • Certified Lasso Developer
> http://www.blacknight.co.uk
>
>
>
>
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Rewrite advice

Jolle Carlestam-3
In reply to this post by detlef.hebbel
14 dec 2011 kl. 13:42 skrev Detlef Hebbel:

> How many beers Jolle?

No beers. I only consume heart medicine nowadays. And pee blood.

HDB
Jolle

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Rewrite advice

Black Night Lists
In reply to this post by Jolle Carlestam-3
Thanks for that, helped a great deal lol

On 14 Dec 2011, at 03:11, Jolle Carlestam wrote:

> Shakespeare did a number of rewrites. Was on the whole very popular in those days since there were no copyright laws.
> I believe it's also common in politics. You take some old speech and rewrite it just a smitten to suit new needs.
> Not to mention all the rewriting that takes place in Hollywood. Has there been a truly new movie idea for decades?

However, these rules seem to work to allow the directory pages to function as normal alongside the wordpress pages.

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks

RewriteRule ^NEW/.*$ - [PT,NC]

RewriteCond %{REQUEST_URI} /Suppliers [OR]
RewriteCond %{REQUEST_URI} /Services [OR]
RewriteCond %{REQUEST_URI} /In-Your-Area [OR]
RewriteCond %{REQUEST_URI} /B2B
RewriteRule ^(([_\ A-Za-z0-9-]|')+)/?$ directory.lasso?p=$1 [L]

RewriteCond %{REQUEST_URI} /Suppliers/(.*)$ [OR]
RewriteCond %{REQUEST_URI} /Services/(.*)$ [OR]
RewriteCond %{REQUEST_URI} /In-Your-Area/(.*)$ [OR]
RewriteCond %{REQUEST_URI} /B2B/(.*)$
RewriteRule ^([^/?]+)/([^/?]+)/([^/?]+)/?$ directory.lasso?p=$1&cn=$2&cid=$3 [L]

</IfModule>

## Wordpress Rules

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks

RewriteBase /
RewriteRule ^NEW/.*$ - [PT,NC]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

## End Wordpress Rules

Regards

Stephen Thirlwell
Black Night Software
LassoSoft Hosting Partner • Certified Lasso Developer
http://www.blacknight.co.uk







#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>