View Full Version : Clean Urls

09-16-2010, 10:51 AM

Yes, I may well win the prize for the dimmest today, I'm big enough to take it, but if you never ask for fear of ridicule, you never learn so here goes.. thanks for your kindness.

I'm doing a really simple static website in Dreamweaver and I want to not show the .htm bit of the address in the browser address bar.

Now I know you do some clever stuff with the htaccess file to get the server to sort it all out.

My question is... when I put <a href="/somedir/somefile">link</a> ... well of course Dreamweaver doesn't understand this so it can't detect broken links anymore... doing a view source on lot's of random sites with clean urls, I see that this is how things are written. I know these sites are not static like mine.. so.. how should I do it then?

Thank you for helping.

09-16-2010, 11:27 AM
It doesn't matter if its a static or dynamic page. modRewrite is modRewrite.


RewriteCond %{DOCUMENT_ROOT}/$1.htm -f
RewriteRule ^(([^/]+/)*[^.]+)$ /$1.htm [L]

09-16-2010, 12:15 PM
Hi Thanks for responding. You are correct. My question was about Dreamweaver's facility for coping with hard coded clean urls and it's own internal link tracking....... I'm thinking that depending on what I do in Dreamweaver, it may affect what I need to do with RewriteRule... this takes a bit of explaining and I'm sorry if it's only making sense to me. Not to worry...

I'm at the point of searching for the ability to put something into Dreamweaver which will enable it to cope with clean urls for broken link checking. I'm hoping it's staring me in the face.

Thanks again.

09-16-2010, 12:33 PM
aha... I see. Sorry, I was to quick with reading.

Re your question I don't believe there is such thing for Dreamweaver, but on the other hand when are you checking your page links with link checker. I believe the link checker option is more for checking external links to other websites/sources to see if they're not become dead links.

09-16-2010, 12:47 PM
No worries, it's kind of you to take the time to respond. I appreciate it regardless.

Dreamweaver produces three link reports for a site, orphaned files and broken (internal) links as well as broken (external) links as you say. Powerful and useful for static websites... and quite impressively robust.

Bit stumped why my numerous searches on this subject are not turning anything up... amazed that my situation should be so unusual.

Thanks again, gentleone. Regards & respect.

09-16-2010, 01:05 PM
Well... than you did teach me something I was not aware of. :) I never used the Dreamweaver's inbuild link checker. I use http://validator.w3.org/checklink/ for this, but of course your site have to be online for this.

Anyways... Good luck with your search and I hope you do find a solution for this and if so... keep us posted ;)

09-16-2010, 02:45 PM
Thank you I will.

The thing about the online checker is: it does one web page at a time.. whereas Dreamweaver can 'check links sitewide' (Site menu). Years ago it did fall over trying to check links for a very large, mixture of a site, but for other sites it's pretty good.... brilliant in fact.... if it understood clean urls, it'd be awesome. I've just double checked.. and yep, it tells me they are all broken.

I will keep searching.. and yes, I'll post anything I find. Thanks again.

09-16-2010, 03:32 PM
Just curious, why do you want "clean" urls

09-16-2010, 04:34 PM
Hi.. your curiosity is welcome.

I have to admit on a static website the seo gain is minimal if at all. And given there is (currently) no database behind it and it's in plain old html, there's absolutely no need to hide the server-side language as a small security strategy. So not the usual technical reasons.

It's entirely user focused. There are, somewhere, surveys which say that users tend to gravitate toward clean urls so I suppose I'm thinking that this site is going to be at a silly, if subtle, disadvantage when displaying in a list against clean urls. And yes... I'm happy for you to point out that it's the title in the standard Google search list that users consciously focus on and click on... note the word 'consciously'. Subliminally, a clean url sitting there does I think make the listing look tidier... all subtle stuff I know but well, it's competitive out there.

Don't mind if you pooh-pooh all that, I'm making no claim to it being right or 'must-have' at the end of the day.


09-16-2010, 04:38 PM
Incidentally I do also have a php site which has clean urls that is effectively a static site.. little bit of page specific dynamics (script processing) and templating (a pre-existing site set-up by someone else and the owner hasn't the budget for a re-work because it's voluntary) - I have the same issue with it.

09-16-2010, 04:41 PM
DWcorse has a point here. This method is most of the time used when the URLs are really dirty such as Joomla URLs :) :

09-16-2010, 04:57 PM
I really don't know of any way for Dreamweaver to handle the issue. I come up with the same type of problems on sites where I've told the server to render .html pages as .php. DW refused to use php for inserting includes.

09-16-2010, 04:59 PM
Gentleone: Yes indeed , I entirely accept that. Entirely clean urls, regardless, are the future my friend... mark my words. I'll put my crystal ball away now, I'm not sure it's genuine crystal. Um...

All the best.

09-16-2010, 05:03 PM
DWcourse. Yes, it's an odd weakness in an otherwise brilliant application isn't it. I'm rapidly coming to the conclusion there isn't 'any way' too, but I've not given up just yet. Trying for some lateral thinking at the mo... hum.. cuppa methinks, might do the trick. I'll let you know if I come up with any hair-brain work around. ... er... don't hold your breath.