Amit Kumar
Amit Kumar

Reputation: 143

Rewrite pretty url for a link

I need help, i have a link like http://website.com/index.php?catg=code&subcatg=code_name ,
when i click on this link, it display this url in address bar and same in task bar on mouse over.

I tried this,

RewriteEngine On

RewriteRule ^index/([A-Za-z0-9-\+]+)/([A-Za-z0-9-\+]+)/?$ http://website.com/index.php?catg=$1&subcatg=$2 [NC,L,QSA]

but it didn't worked. Is it possible to rewrite this url to http://website.com/index/code/code-name ??? and it must look pretty url in both address & task bar.

please help
Thanks

Upvotes: 1

Views: 78

Answers (1)

JenGettings
JenGettings

Reputation: 41

It looks like this might be what you are looking for:

URL rewriting that visibly rewrites (changes the URL in the address bar)

You might just need to add the "R" flag.

Upvotes: 1

Related Questions