-3

I'm trying to show this url http://www.xyz.com/catnew/newcat.php as http://www.xyz.com/cat. Any help is appreciated.

Oldskool
  • 34,211
  • 7
  • 53
  • 66
Kishor Kumar
  • 543
  • 1
  • 12
  • 33

2 Answers2

2

look up tutorials on mod_rewrite, if your on Apache this may be the answer depending on how you want to do it.

James
  • 3,265
  • 4
  • 22
  • 28
1
RewriteEngine On
RewriteRule ^cat/([^/]*)$ /catnew/newcat.php?cat=$1 [L]

The original URL:

http://www.xyz.com/catnew/newcat.php?cat=3

The rewritten URL:

http://www.xyz.com/cat/3
Sandeep Bansal
  • 6,280
  • 17
  • 84
  • 126