Forum Moderators: phranque

Message Too Old, No Replies

URL Rewrite for php website

How can i rewrite?

         

ashis06

8:51 am on Jun 10, 2008 (gmt 0)

10+ Year Member



Hi,

I want to rewrite this url:

http://www.example.com/view_colleges.php?c_id=1

I want it to
http://www.example.com/university-of-wolverhampton/
OR http://www.example.com/university-of-wolverhampton.php

Please help me.

[edited by: jdMorgan at 10:52 pm (utc) on June 10, 2008]
[edit reason] example.com [/edit]

jdMorgan

10:52 pm on Jun 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See the thread, Changing Dynamic URLs to Static URLs [webmasterworld.com].

[added] On the basis of the HTTP standards, I would suggest that your URL should be "http://www.example.com/university-of-wolverhampton". This is a valid extensionless "page" URL, as opposed to a directory URL, and will never need to be changed again, even if your site infrastructure changes, say, to cold fusion or to .asp. [/added]

Jim

[edited by: jdMorgan at 10:56 pm (utc) on June 10, 2008]

ashis06

5:17 am on Jun 20, 2008 (gmt 0)

10+ Year Member



OK. I have 6 dynamic url.

How can I create rule for them. Should I create 6 rules or only one rule ?
If multiple rules then where should I include the rules, In one htaccess file or multiple htaccess file.

I have created rules for above dynamic url.

RewriteBase /
RewriteRule ^university-of-wolverhampton/?$ view_colleges.php?c_id=1 [NC,L]

Will it be work?

Kindly suggest