CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Prevent HTML page view in converted site

Print topic Send  topic

Author Message
JayEdgar


Posts: 77
Posted: 01/25/2009, 4:54 AM

Greetings,

I have an existing site with .html files that has been dropped into my lap . I want to convert the entire site to CCS. You probably see where I'm going: all of the existing .html files will be replaced with the CCS template .html files, so if people go to bookmarks, they will see the template pages instead of the php pages.

What is the best way to handle this?

My first thought is to put in some kind of javascript that will autoforward to the php page, but when opened from the php page, the js will be disabled somehow...

My second thought, which I don't like nearly as much, is to rename every page; however the pages have simple, obvious names, like articles.html, so I don't really want to do this.

I've searched the forum, but the only reference I've found is this one: http://forums.yessoftware.com/posts.php?post_id=48527 I don't necessarily want to prevent seeing all html files, since there may be some I do want seen for some reason.

Someone must have dealt with this before me--would anyone care to share your wisdom?

Thanks in advance,

Jay
View profile  Send private message
datadoit
Posted: 01/25/2009, 8:04 AM

JE, explanation here: http://forums.codecharge.com/posts.php?post_id=99679

Here's a working sample .htaccess file:

RewriteEngine ON

# DirectoryIndex index.php default.php

# Redirect viewing of html page to php page.

# Exclude the DatePicker.html from the rule since there's no
accompanying php file.
RewriteCond %{THE_REQUEST} !^.*/DatePicker.html

# Exclude FCKEditor files.
RewriteCond %{THE_REQUEST} !^.*/fckeditor.html
RewriteCond %{THE_REQUEST} !^.*/fckdialog.html
RewriteCond %{THE_REQUEST} !^.*/fck_link.html
RewriteCond %{THE_REQUEST} !^.*/fck_image.html
RewriteCond %{THE_REQUEST} !^.*/fck_image_preview.html
RewriteCond %{THE_REQUEST} !^.*/browser.html
RewriteCond %{THE_REQUEST} !^.*/frmfolders.html
RewriteCond %{THE_REQUEST} !^.*/frmresourceslist.html
RewriteCond %{THE_REQUEST} !^.*/frmactualfolder.html
RewriteCond %{THE_REQUEST} !^.*/frmresourcetype.html
RewriteCond %{THE_REQUEST} !^.*/frmcreatefolder.html
RewriteCond %{THE_REQUEST} !^.*/frmupload.html

# Redirect all other html requests to the appropriate php file.
RewriteRule ^(.*)\.html$ $1.php

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.