|Using directories to hide script technology?|
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:
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?
(Using a default page under every directory, and using the directory name as the unique "page" link.
I now hide the script technology, didn't for many years, just made all pages an .HTML extension.
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.
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.
Yep, that's an APACHE function, but you can run Apache on a Windows box, I think it has way more future than IIS.
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?
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!
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"
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.
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...
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.
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?
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"!
Ahhh great! Thanks for that - excellent news!
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!