Forum Moderators: phranque

Message Too Old, No Replies

wanna create Create User Friendly URLs?

Using .htaccess change

         

rootlk

7:43 am on Dec 15, 2010 (gmt 0)

10+ Year Member



i have problem with making url user friendly so i had change my .htaccess files as flows

//
RewriteEngine on
RewriteRule ^about/$/pages/about.html [L]
//

to make
http://example.com/pages/about.html
to view like this
http://example.com/about

its not working on...
can any help me out...

[edited by: engine at 9:48 am (utc) on Dec 15, 2010]
[edit reason] please use example.com [/edit]

g1smd

12:16 am on Dec 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Did you flush browser cache before testing?

Did you change links on the pages to point to the new URL.

A rewrite does not "make" a URL. It allows a URL request to connect with a non-default filepath inside the server.

rootlk

5:23 am on Dec 16, 2010 (gmt 0)

10+ Year Member



so can i have the actual coding to change in .htaccess file to make my url user friendly....

jdMorgan

4:29 pm on Dec 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no such code.

You make 'friendly' URLs by linking to them from your pages. The links on your pages define the URLs.

The code then 'connects' those friendly URLs to the correct filepaths inside the server.

So the code itself cannot 'change' the URLs. It only allows the new URLs to function.

See our Apache Forum Library [webmasterworld.com] for many threads and tutorials on this subject.

Jim