views:

23

answers:

1

Hay, can someone lend a helping hand to get a rewrite rule to work?

I'm developing a CMS and the URL currently look like this

page.php?id=2/About-us

I want to remove the

page.php?id=2/

part of the URL and just show

About-us

Any ideas how to get this working?

EDIT

I have since changed my URLS to

page/PAGE_NAME

and used the rule

RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L]

However, apache just says that index.php was not found on the server.

A: 

Are you sure it is index.php and not page.php?

Please try

RewriteRule ^/page/([^/]+)$ /index.php?page=$1 [L]

If you need a permanent move

RewriteRule ^/page/([^/]+)$ /index.php?page=$1 [R=301,L]
ring0
With the first rule, if i go to /page/Treatments it gives a 404. If i remove the leading / it says index.php was not found (404)
dotty