Hi,
I have just finished laying out a university society website:
www.exeterflying.co.ukI am trying to learn how to use .htaccess files to change the appearence of the URL.
My aim is to change the pages URLs which currently work like so:
Home page (also works as above):
www.exeterflying.co.uk/index.php?p=homeAnd another example - Contact page:
www.exeterflying.co.uk/index.php?p=contactAnd to change them so that is the real URL but in the address bar in the browser they look somehting like this:
www.exeterflying.co.uk/home
and: www.exeterflying.co.uk/contact
I pressume I am right in thinking I should be using a .htaccess file and have got close to the result but it has always ended up redirecting the URL, ie changing it in the address bar when i get to the page!
Some of the combinations I have found and tried from google:
CODE
RewriteEngine on
rewriterule ^[^/]+/(.*) /index.php?p=$1 [R,L]
RewriteRule ^[^/)?$ index.php?p=$1[R,L]
RewriteEngine on
rewriterule $(/)[a-z]+ /index.php?p=$1 [R,L]
RewriteEngine on
RewriteRule ^/contact$ /index.php?p=contact[nc]
RewriteEngine On
RewriteRule ^(http://www.exeterflying.co.uk/[A-Za-z0-9-]+)/?$ index.php?page=$1
Am I on the right lines? Can anyone give me any pointers? I have already read most of the Apache page on this and either didn't fully understand it or just didn't apply to this.
Cheers,
Ed