I was trying to rewrite some urls witht he following rule:
[CODE]RewriteRule ^([a-z0-9-]*)$ news.php?slug=$1
it works as long as i try site.com/title-goes-here
but it also means that any word a-z char and 0-9 typed after site.com will be taken as slug
so when i try to use this rule (also working before apply the ^ upper one)
[CODE]RewriteRule ^page$-([0-9]+)$ index.php?page=$1
which would output the site.com/page-3(or 4 or whatever)
i found a temporarely solution which helps the rule to “indicate” that only this type of urls should be received and “read” as slug
[CODE]RewriteRule ^test-([a-z0-9-]*)$ news.php?slug=$1
seems that the word test- helps to be read correctly so , when i try site.com/test-something-here
[b]something-here
The result i am looking for is this:
rewrited url ————————— original url
site.com/some-title-of-the-news – site.com/news.php?slug=title-of-the-news (i don’t want to add any / chars e.g. sitem.com/news/tite-of-the-news if this is possible!)
site.com/page-1 – site.com/index.php?page=1
site.com/contactme – site.com/contactform.php
Thanks in advance!