Reputation: 349
Is there any way to make a php
-based URL rewriter? I want to make a URL rewrite module for my company's CMS.
For example:
http://www.seacen.org/v2/content.php?id=32&lang=1.htm
to
http://www.seacen.org/v2/content/32/1
Upvotes: 0
Views: 98
Reputation: 5179
create a .htaccess
file and paste the following inside it
Options +FollowSymLinks
RewriteEngine on
RewriteRule content/(.*)/(.*)/ content.php?id=$1&lang=$2.html
chances are that your mod_rewrite is already enabled, but if not:
LoadModule rewrite_module
modules/mod_rewrite.s
Upvotes: 2