poleposters Posted July 11, 2009 Share Posted July 11, 2009 Hi, I'm working on quite a large project, and I want to add a professional touch to it. I want to convert all dynamic URLs to static. ie http://www.domain.com/blog/article?id=1 to http://www.domain.com/blog/articleone.html(or close enough) The site is hosted on a third party server, so I don't have access to mod_rewrite. I found a great article on sitepoint, however its quite limited. Its only shown me how to turn http://www.domain.com/blog.php to http://www.domain.com/blog An example of what I'd like to do is found on http://www.mikebaird.com.au/interactive/mikes_blog/sat_21_march.html I know that the blog articles are created from a database. And that a file called sat_21_march.html hasn't been specifically written.What I don't know is how its being done? Can someone point me in the right direction. Cheers, Matt Link to comment https://forums.phpfreaks.com/topic/165571-converting-dynamic-urls-to-static-urls/ Share on other sites More sharing options...
trq Posted July 11, 2009 Share Posted July 11, 2009 The site is hosted on a third party server, so I don't have access to mod_rewrite. If the server is apache you can usually define mod_rewrite rules via a local .htaccess file. Without mod_rewrite, your probably going to be fighting an uphill battle. Link to comment https://forums.phpfreaks.com/topic/165571-converting-dynamic-urls-to-static-urls/#findComment-873345 Share on other sites More sharing options...
poleposters Posted July 11, 2009 Author Share Posted July 11, 2009 Thanks. I think you're right about it being an uphill battle. I've created a .htaccess file and I get a server error when i try to use it. I'm pretty sure I've named it correctly. I'm putting in my htdocs folder. Below is the total contents of the file: Options +FollowSymLinks RewriteEngine on RewriteRule index/(.*)/(.*)/$ /blog/index.php?$1=$2 Am i doing something wrong? Do i need to change something in my php.ini file? Link to comment https://forums.phpfreaks.com/topic/165571-converting-dynamic-urls-to-static-urls/#findComment-873599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.