Link to home
Start Free TrialLog in
Avatar of DReade83
DReade83Flag for United Kingdom of Great Britain and Northern Ireland

asked on

How to tell Apache to ignore a certain part of an SEO friendly URL, but include the rest

I'm using SEO friendly URLs throughout a client site. The RewriteRule function is being used to do this, as follows:

RewriteRule ^index/(.*)/ index.php?p=$1
RewriteRule ^index/(.*)/(.*)/ index.php?p=$1&q=$2

I want to write some URLs for a forum topic page, as follows:

/index/thread/this-is-the-topic-title-1/

Basically the only thing I want being passed to the PHP query is the number (this is the Thread ID), the text "this-is-the-topic-title-" needs to be ignored, but I don't know how to do that.

Any ideas?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of diaF
diaF
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DReade83

ASKER

Thank you very much - that worked a treat. :-)