Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 11-05-2004, 06:31 PM Complete newbie
Junior Talker

Posts: 3
Trades: 0
I have had a strictly html site for a couple years. I have now discovered PHP. I have created a header.htm file that contains my site navigation bar. I want to put this on all my main category pages so when my menu changes, I can change one file and not the code on every page. Unfortunatly I found out after a couple hours of trying that I have to rename all my pages **.PHP for the code to work. I am sure a lot of people have bookmarked my **.html pages. Does anyone have a suggestion as to implementing the new php pages without losing a bunch of customers?
Knifeman is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-05-2004, 07:46 PM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
Quote:
Originally Posted by Knifeman
I have had a strictly html site for a couple years. I have now discovered PHP. I have created a header.htm file that contains my site navigation bar. I want to put this on all my main category pages so when my menu changes, I can change one file and not the code on every page. Unfortunatly I found out after a couple hours of trying that I have to rename all my pages **.PHP for the code to work. I am sure a lot of people have bookmarked my **.html pages. Does anyone have a suggestion as to implementing the new php pages without losing a bunch of customers?
you could keep your existing pages but redirect them to the new .php pages.. but that is a really simple way of doing it, im sure that someone else on here will give you a better answer but only trying to help

HTML Code:
<html>
<head>
<meta http-equiv="Refresh"
content="5;url=http://www.yoururl.com">
</head>
<body>
<p>
<a href="http://www.whatever.com">http://www.whatever.com</a>
</p>
<p>
You will be redirected to the new address in # seconds.
</p>
<p>
If you see this message for more than "How long you want, usually 5" seconds, please click on the link above!
</p>
</body>
</html>
hope this helps
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
Old 11-05-2004, 07:51 PM
Junior Talker

Posts: 3
Trades: 0
That is not a bad idea. I could add some text about updating their bookmarks and leave the old pages online for a few months. THANKS!
Knifeman is offline
Reply With Quote
View Public Profile
 
Old 11-05-2004, 08:00 PM
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
You can also use .htaccess modrewrite.

Add the below code in a file named as .htaccess and upload it after necessary changes.
backup you old .htaccess file from your server.

You should use -al params in your ftp to see the hidden files in your server.

Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/oldurl.html
RewriteRule ^(.*) /newurl.php   [L]
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 11-05-2004, 08:21 PM
Junior Talker

Posts: 3
Trades: 0
That rewrite works well. Is there a limit to the number of html pages I can list? If I list more than one, do I repeat the entire code or just add mor e old and new urls?
Knifeman is offline
Reply With Quote
View Public Profile
 
Old 11-06-2004, 07:55 PM
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
What I do is like this
PHP Code:
RewriteEngine on
RewriteCond 
%{REQUEST_URI} ^/$1.html  [F]
RewriteRule ^(.*) /$1.php   [L

Also check out
http://www.devwebpro.com/devwebpro-3...ess-Magic.html
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Reply     « Reply to Complete newbie
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28974 seconds with 12 queries