homepage Welcome to WebmasterWorld Guest from 54.227.67.175
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
Using directories to hide script technology?
mediafrenzy




msg:367946
 11:53 pm on Feb 12, 2005 (gmt 0)

Hi folks - I'm setting up a website which I'm wanting to be as futureproofed as possible, so that I can keep adding to it for years and years, without having to take big steps back if I change something major.

At the moment I'm using asp, sorted into relevant directories, but individual articles are still visible as .asp files... eg:

www.widget.com/
www.widget.com/reviews/
www.widget.com/reviews/blue-widget.asp

If I decide to go to php in the future or something, this is going to screw up all my hard work presumably - eg loss of SE traffic when I switch all pages to php etc.

Is it acceptable (or wise) to instead use the following structure, to hide the script technology from the visitor/search engines?

www.widget.com/
www.widget.com/reviews/
www.widget.com/reviews/blue-widget/

(Using a default page under every directory, and using the directory name as the unique "page" link.

Cheers.

 

incrediBILL




msg:367947
 12:08 am on Feb 13, 2005 (gmt 0)

I now hide the script technology, didn't for many years, just made all pages an .HTML extension.

www.widget.com/reviews/blue-widget.html

A quick tweak to the re-write rules and my technology was hidden :)

I wouldn't be to concerned over future-proofing the site as no matter what you do, eventually it will become somewhat obsolete. If you don't think so, drop by and try to read some of my old 8" or 5" floppies, heck, I don't see a slot for 3" in my new box.... and all my CDs (future proofing) are already going by the wayside now with my new DVD burner. My point is good planning can ease the pain, but never fully eradicate it.

mediafrenzy




msg:367948
 12:21 am on Feb 13, 2005 (gmt 0)

Hehe yeah I know total future proofing is a pipe dream.

You mention using rewrite to mask all pages as Html - isn't that an apache function? Sorry if this is a dumb question!

Its just that I'm currently using ASP/windows host.

incrediBILL




msg:367949
 12:26 am on Feb 13, 2005 (gmt 0)

Yep, that's an APACHE function, but you can run Apache on a Windows box, I think it has way more future than IIS.

mediafrenzy




msg:367950
 12:34 am on Feb 13, 2005 (gmt 0)

Which is why I'm trying to design my site so that I could possibly move to apache in the future - without destroying my site in the process!

I'm having to use ASP at the moment, as my friend is helping me with scripting, and he knows ASP, but I thought that by using directories, then at a later date if I decide to move to linux etc, then I could seemlessly change the pages - and all the links would still work... is this a stupid idea?

Is it acceptable practice? Is it likely to damage SE rankings?

mediafrenzy




msg:367951
 12:37 am on Feb 13, 2005 (gmt 0)

EG:

www.widgets.com/
www.widgets.com/reviews/
www.widgets.com/reviews/review1/
www.widgets.com/reviews/review2/
www.widgets.com/reviews/review3/
www.widgets.com/articles/article1/
www.widgets.com/articles/article2/
www.widgets.com/articles/article3/

This site could be running asp, php, anything... and still keep its search engine traffic/links from other sites all functional. Thats my newbie thinking anyway!

jdMorgan




msg:367952
 1:30 am on Feb 13, 2005 (gmt 0)

For IIS, look into ISAPI Rewrite. It provides the same basic functions as mod_rewrite on Apache.

Also, your URLs should not end with a slash -- A slash means a directory. Just use "www.widgets.com/reviews/bluwidgets"

Jim

mediafrenzy




msg:367953
 2:13 am on Feb 13, 2005 (gmt 0)

I am on a shared host - which doesn't have ISAPI rewrite, so I'm not sure that's an option.

I'm aware that a slash means directory, and basically am asking whether its an acceptable practice to use directory structure as the URL... I'm not sure whether I'm being clear in my description.

The URL
www.widgets.com/reviews/bluewidget/
will currently have default.asp in the bluewidget directory, but a year later i could change to php and have index.php as the document in the bluewidget directory.

It just struck me as being a lowtech and simple way for me to keep the same URL no matter what scripting i'm using? Maybe its a dumb way to do things... but I don't have that many options for future proofing on a windows shared host...

Thanks for the suggestions - welcome any other feedback. Maybe I should just not worry about it and keep developing in ASP and build future sites in PHP if i make the move...

jdMorgan




msg:367954
 4:37 am on Feb 13, 2005 (gmt 0)

It's a perfectly valid question about a perfectly-valid technique... One that the W3C recommends, and for the same reason you are asking about.

The point I'm trying to make is that it's not a good idea to have one page = one directory -- That in itself will make your site hard to manage now, to say nothing of future-proofing. So, I'm proposing that you find a way to make your server work if you just omit the filetype.

I wish I knew more about Windows servers... This is very easy to do on Apache, and it's probably possible on Windows as well.

As for hosts lacking support -- There are many hosts available, and they compete for customers. Find some that compete on features rather than price, though. I moved a site just last week... It didn't take four hours from start to finish, DNS propagated overnight, and now I have the feature support the site has needed for the past year.

Jim

mediafrenzy




msg:367955
 11:35 pm on Feb 13, 2005 (gmt 0)

Thanks for your help!

I have been very impressed with my host thus far (I have dealt with bad hosts before - never again!), and the IIS version of rewrite has been pretty much the only thing they've been unable to provide.

I see what you're saying about the 1file/directory thing - it does makes things trickier I know.

If I was to stay with visible ASP URLs for the moment, and then moved to php versions of the same files later - could i then easily use Mod Rewrite in apache to seemlessly change over? Eg so that the search engines AND visitors would have no problems with the transition?

Although thinking about it, that would surely mean that established Page Rank etc on the old ASP pages would be lost - and the new PHP versions would be counted as fresh nonmature pages?

encyclo




msg:367956
 1:55 am on Feb 14, 2005 (gmt 0)

If you go with an ASP extension now and if you later move to a Linux/Apache setup with PHP and mod_rewrite, all you would need to do on the new server is to map the .asp extension to be parsed by PHP in a .htaccess file:

AddHandler application/x-httpd-php .asp

As long as you're stuck with a shared Windows server, then having extension-less filenames isn't possible, and I think we all agree that one file per directory is unmanageable. However, it's not a great handicap if moving to Linux/Apache, because of the greater flexibility of the latter system.

Just remember that you should never change filenames, that's all. Using an .asp extension under Apache even if it's actually PHP is not a problem, and it could even be construed as a bit of "security by obscurity"!

mediafrenzy




msg:367957
 8:18 am on Feb 14, 2005 (gmt 0)

Ahhh great! Thanks for that - excellent news!
Phew!

Great having places like Webmasterworld to draw on so much collective experience and knowledge! Thanks again. You'll no doubt be hearing from me again soon!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved