Foxladi
11-09-2007, 02:50 AM
Hi
I have used this script for a long time on my old host, but when we moved the files to bluehost, the script stopped working. The site is: www.tips-og-tricks.com (http://www.tips-og-tricks.com)
It looks like this:
in .htaccess:
<Files tippet>
ForceType application/x-httpd-php
</Files>
The file "tippet" contained the following code, not very elegant, but it worked. I needed it to change the danish characters into codes in order to use them in the title, and the text is afterwords fetched in the MySQL database:
//split the URL into parts using "/" as the delimiter:
$urlarray=explode("/", $REQUEST_URI);
//Contains "2", or the ID of the article to display:
$post=$urlarray[2];
$_SESSION['post']=$urlarray[2];
$erstat = array(" ", "æ", "ø", "å", "ø", "");
$med = array("_", "%C3%A6", "%C3%B8", "%C3%A5", "%F8", "!");
$tip = str_replace($med, $erstat, $post);
$story=mysql_query("select * from nuke_stories where title='$tip'") or die(mysql_error());
It seems that the script doesn't get the URI.
So I tried several things with rewrite rules in .htaccess, which didn't work as well.
I have asked support for help on how this works on bluehost, but the supporter, Erik, couldn't help me.
Do any of you have a clue?
- Britt
I have used this script for a long time on my old host, but when we moved the files to bluehost, the script stopped working. The site is: www.tips-og-tricks.com (http://www.tips-og-tricks.com)
It looks like this:
in .htaccess:
<Files tippet>
ForceType application/x-httpd-php
</Files>
The file "tippet" contained the following code, not very elegant, but it worked. I needed it to change the danish characters into codes in order to use them in the title, and the text is afterwords fetched in the MySQL database:
//split the URL into parts using "/" as the delimiter:
$urlarray=explode("/", $REQUEST_URI);
//Contains "2", or the ID of the article to display:
$post=$urlarray[2];
$_SESSION['post']=$urlarray[2];
$erstat = array(" ", "æ", "ø", "å", "ø", "");
$med = array("_", "%C3%A6", "%C3%B8", "%C3%A5", "%F8", "!");
$tip = str_replace($med, $erstat, $post);
$story=mysql_query("select * from nuke_stories where title='$tip'") or die(mysql_error());
It seems that the script doesn't get the URI.
So I tried several things with rewrite rules in .htaccess, which didn't work as well.
I have asked support for help on how this works on bluehost, but the supporter, Erik, couldn't help me.
Do any of you have a clue?
- Britt