Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rewrite - is it possible? 1

Status
Not open for further replies.
Hi

Certainly possible.

As you mentioned no restrictions, the simplest way is this :
Code:
RewriteRule (\d+).* /showtopic.php?thread=$1
But that may also transform some requests you would not want to, for example /error404.php to /showtopic.php?thread=404 . So a more restrictive expression would be better, something like this :
Code:
RewriteRule ^(\d+)-.*\.htm$ /showtopic.php?thread=$1
( Note that [tt]RewriteRule[/tt]'s behavior has minor differences whether is used in global or per directory configuration. )

Feherke.
 
That's awesome, thanks!

- Andy
___________________________________________________________________
If a man speaks in a forest and there are no women around to hear him - will he still be wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top