![]() |
|
#1
|
|||
|
|||
html to phpHi all
When we set up our website we were very new to it all and just went with the flow and created all our pages in html. Now however, certain new pages and things like the gallery, forum etc are in php. I have tried to use php includes on html pages for things like random photo's or forum threads but it just aint working. The only way I can see is to change my index.html to index.php, So to the question/s What will happen to the thousands of links, especially those on search engines? if I create a redirect will those links still find my pages? Any ideas appreciated |
|||
|
#2
|
||||
|
||||
|
you can get php to parse in .html if you change some details in your .htaccess. JDS has a tutorial, he'll post the tutorial for you.
R |
|
#3
|
||||
|
||||
|
Hello Tenaki,
Important: everything I can suggest below depends on the web server you use; if it's Apache, then read on. If it's anything else, then I am unable to share any useful information for you to do this easily. If Apache it is, you have 2 choices:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
|||
|
|||
|
Do you have access to the apache configs?
|
|
#5
|
|||
|
|||
|
Hi thanks for all the help so far
Yes I have access to apache and is it mime types. There is an .htaccess that the host put on for me as per jds reply, I am checking to see if it's the same Quote:
Will let you know how it goes |
|
#6
|
|||
|
|||
|
I have set up the test as you said but the page is totally blank
Quote:
I looked in the public_html directory and the host has put this Quote:
What do you think? I also think they added some mime types |
|
#7
|
||||
|
||||
|
Oops, that's something I forget to mention... always make a backup copy of the original .htaccess file and that the .htaccess file is a hidden file.
Are you telling us that your new .htaccess file contains the following lines?: Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#8
|
|||
|
|||
|
No that has been in there some time, I think the Host put it in, I haven't overwitten by the way.
I just tried your little bit of code to see it worked <body> <html> <head></head> <body> <h1> <?php echo "I LOVE PHP!"; ?> </h1> </body>body> And it don't. The strange thing is I can use a php who's online script. <script src=" /online/online.php"></script> works fine, but any includes are just ignored? |
|
#9
|
||||
|
||||
|
OK, if your host is helping you out with this; just tell him to backup your existing .htaccess file and create one with just these lines in it; nothing else, at least while you get this sorted:
Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#10
|
|||
|
|||
|
I think I have cracked it
I used the include in an iFrame ad it works!! What do you think does that make sense? |
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimizing your web server with Turck MMCache for PHP | JdS | Web Hosting Forum | 2 | 07-Jan-2004 07:48 |
| apache2 - php cgi fehler - schleife | inna | Apache Web Server Forum | 8 | 27-Nov-2003 09:55 |
| [Linux] Installing PHP --with-mcrypt | JdS | Web Hosting Forum | 0 | 20-Aug-2003 08:40 |
| PHP in HTML | jrobbio | Web Design Forum | 4 | 24-Jul-2003 06:05 |
| All the big PHP script collections that matter | jrobbio | MySQL / PHP Forum | 5 | 06-Jun-2003 16:14 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The