Fabián
Fabián

Reputation: 575

Change url path to a custom one

I don't know how this technique is called, but here's the basic idea:

Say I have different sections within my site, and inside the address box of the browser, I don't want to show the "variable formula" to get inside a specific section of my site.

For instance, instead of this shown:

www.mywebsite.com/index.php?s=1&p=2


I want this shown:

www.mywebsite.com/About/JohnKimbo/


Is this possible?

Upvotes: 0

Views: 1618

Answers (3)

Fabián
Fabián

Reputation: 575

I've found this videotutorial (Basic URL Rewrite with Mod_Rewrite) that explicitly shows how to do it without so deep understanding about many other concepts of Apache's config.

Also I recommend this Introduction to Regular Expressions made by Michael, for people who don't even understand or know about Regex coding.

Upvotes: 0

charliefortune
charliefortune

Reputation: 3200

You need to investigate .htaccess rewrite rules, and regular expressions. On an Apache server, you need to have mod_rewrite enabled then you can parse out the index.php and the other query string characters you don't want.

Upvotes: 1

Menthos
Menthos

Reputation: 330

Yes, it is possible :)

This technique is called 'URL rewriting'. The Apache guide should get you started: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Upvotes: 1

Related Questions