This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Help getting rewrite regex to work
Message |

Joined: 28 April 2010
Location: United Kingdom
Posts: 43
Posted: 27 October 2010 at 1:44pm


I've been getting some help from Anton with regard to getting the APE regex to work for a series of sites that I am updating.

The current REGEX looks like -

"RewriteEngine on

SetEnv mod_seo

RewriteBase /

SeoRule ^/([^.]+)\.asp\?([^&=]+)=([^&=]+)(?:(?:&|&)([^&=]+)=([^&=]+)(?:(?:&|&)([^&=]+)=([^&=]+))?)?(?:&|&)([^&=]+in)=([^&=]+)$ /$1/$2-$3(?4/$4-$5)(?6/$6-$7)/$8-$9 [NC,L]

RewriteCond %{REQUEST_URI} !^/(?:amin|em|js|wm) [NC]

RewriteRule ^([^.]+)/([^/-]+)-([^/-]+)(?:/(.+)-([^-]+)(?:/(.+)-([^-]+))?)?/(.+in)-(.+)$ $1.asp?$2=$3(?4&$4=$5)(?6&$6=$7)&$8=$9 [NC,L]"

I think Anton must be on leave, as I've got one final query, but haven't had a response from my emails to him.

The issue that i am having is that the regular expression used to write the syntax for the URL rewriting, it appears that it is changing a URL with two parameters to a URL with two directories, which is great, but failing to read the URL with two directories as the original URL with two parameters.




Should work, as it is actually


So in other words it changes into

 Fine � this is perfect.


BUT it fails to read as being and instead sends the user to a 404 page.


Please advise me how I can resolve this.


I need to get these updates completed as quickly as possible as my client is getting very impatient, and unfortunbatley, whilst I'm sure that APE can do what we are looking for, your instructions aren't the easiest to understand.


Thanks for all your help.



Back to Top
Admin Group

Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 27 October 2010 at 6:27pm

I’m sorry for delay. Anton is on his vacation and we’ve missed your responses.

Please try the following rule:
RewriteRule ^([^./]+)/([^/-]+)-([^/-]+)(?:/(.+)-([^-]+)(?:/(.+)-([^-]+))?)?/(.+in-.+)$ $1.asp?$2=$3(?4&$4=$5)(?6&$6=$7)&$8 [NC,L,QSA]


Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version