UPDATE 1:
Sorry, what I meant was this:
I currently have the following url:
http://www.companyname.com/page.php
How can I convert that to
http://www.companyname.com/group/name
and
http://www.companyname.com/group/name/
ORIGINAL QUESTION:
I currently have th开发者_高级运维e following url:
http://www.companyname.com/page.php
How can I convert that to
http://www.companyname.com/group/page
Something along these lines:
RewriteRule ^group/page/?$ page.php
or:
RewriteRule ^group/(.+)/?$ $1.php
for other pages in this style.
I assume you want the user to see /group/page
, as it is prettier.
RewriteEngine On
RewriteRule ^group/(.+)$ $1.php
There is a lot of instructions on this theme.
For example
Please URL Rewrite in php
Official documetation
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
精彩评论