The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
address.co.uk/index.php/news
address.co.uk/index.php/contact
and so on, how do I set up url rewriting so it says
address.co.uk/news
address.co.uk/contact
etc
I know there are some ways of doing it using the .htaccess file, but I hear that is not the best/correct way.
My domain and hosting is all held with freeola so hoping someone has come across this and knows the best manor in which to amend the addresses!
Thank you for any advice.
You should be able to do what you require using .htaccess, nothing wrong with that.
You need something like this in your .htaccess file, which should be located in your web root (htdocs):
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
This code will ensure that the Apache (webserver) loads the rewrite module, it will then cause the web server to take everything after index.php to be rewritten to /, so yoursite.com/index.php/news should end up being working if a visitor attempt to visit yoursite.com/news.
It will exclude images and robots.txt.
Seems to me, and I'm no expert, that you have a link and folder problem.
Your main file ... 'index.php' should sit in .htaccess file with all its associated required files.
Any 'pages/content' should be within a separate folder within the .htaccess file and linked to accordingly e.g
"News/whatever"
Create a News folder, save it within .htaccess folder, within the 'News' folder create your content. To link ... see above
address.co.uk/index.php/news
address.co.uk/index.php/contact
and so on, how do I set up url rewriting so it says
address.co.uk/news
address.co.uk/contact
etc
I know there are some ways of doing it using the .htaccess file, but I hear that is not the best/correct way.
My domain and hosting is all held with freeola so hoping someone has come across this and knows the best manor in which to amend the addresses!
Thank you for any advice.