Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can mod_rewrite be used as a Url Pattern matching mechanism?

Status
Not open for further replies.

boumbo23

MIS
Jan 28, 2007
1
CA
Hi everyone,

I would like to add a new functionality to a website to make URLs in the browser window more readable for users. Some sort of Url Pattern matching mechanism that would Hide the real URL on the browser window and instead show a simpler URL.

My website is running PHP Version 5.1.1-gentoo, Apache 2.0, and MySQL 4.1.14. Im using an OpenSource CMS called Xoops (xoops.org) which makes the website much more dynamic.


Every URL is dynamically generated by php commands with the help of the CMS, Xoops.


I.e.
Instead of having to type the following URL:
1) egory&id=28

You could type the following and it would still lead to the above url but would only show the url below in the browser window:
2)

URL 2) would not change even if URL 1) would eventually change.

I found this rewrite rule on the apache url rewrite guide ( ):
Content handling - Rewrite from Old to New (intern)

Is this a suitable solution?
It looks to me like this is not what I am looking for, as this only allows a site to be redirected without the user knowing of the change. But the idea of showing a simpler URL to the user while hiding the real one is what I am looking for, and also the fact I'm using a CMS that generates Url dynamically with the help of a database has to be taken in consideration.

If anyone knows of an efficient rule using mod_rewrite or any other module please let me know.

Thanks.
 
Hi

boumbo23 said:
Is this a suitable solution?
Yes. The best.
boumbo23 said:
this only allows a site to be redirected without the user knowing of the change
The default is the internal rewrite, not noticeable on the client side. If you add the [tt][R][/tt] flag to the [tt]RewriteRule[/tt] directive, it will redirect, asking the user agent to request for the new URL.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top