Jump to content

URL: /random/ instead of ?page=random


Anders Moen

Recommended Posts

Hey!!I know the Googlebots and other bots don't like the url like this: ?page=something and especially not ?page=something&someElse=hahabut now I was thinking of redoing it from ?page=something to /something/ just like WordPress, but I don't know...at Diskusjon.no (Norwegian) they said .htaccess, but I don't know...they gave me links, but I didn't understand a thing, because ...let's say it this way: .htaccess isn't my strong site except for error documents hehe..So, can anyone help me doing this?Thanks!

Link to comment
Share on other sites

Thanks for the answers, and now I finally figured it out. Got a new host, with my own domain (andersmoen.com), and then I used this code in the .htaccess file:

RewriteEngine onRewriteRule ^([A-Za-z0-9-]+)/?$ index.php?page=$1 [L]

And then, instead of linking to ?page=something I used /something/ and it worked perfect :)

Link to comment
Share on other sites

as long as there is only one URL string parameter and you always call it page - then yes, that will work. It seems a little bit of a restrictive solution but it heads in the right direction.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...