computerbarry — 2013-10-11T14:43:18-04:00 — #1
I had a previous post in another category http://www.sitepoint.com/forums/showthread.php?1172680-How-do-I-keep-Facebook-likes-after-URL-change
The above went unanswered which brings here.
I have a general rewrite that works ok and have a indexed page.php I need to add extra content to this page page/more-content which for the time being can't have the extension removed. .php in this case.
What are the concerns and is it ok to have the pages structured like this?
and so on...
I won't be rewriting page.php what I mean is I won't be linking to /page
This is my main worry because I'll be serving content without the file extension to other pages.
Hope this makes sense, thanks.
dklynn — 2013-10-12T08:02:26-04:00 — #2
I avoid this sort of thing like the plague but, if you want to pursue it, you'll need Options +MultiViews which will examine the directories in the path and serve a file despite the extension not being specified. Of course, page.php will have to deal with the $SERVER['REQUESTURI'] whether it contains/requests any more content.
The downside I've seen from members in the past is that they use the same name for a subdirectory as a filename and wonder why the requested file (in the subdirectory) isn't being served. If you're better organized than the other members (and me, too!), they you should be okay.
computerbarry — 2013-10-12T16:41:37-04:00 — #3
I avoid this sort of thing like the plague
Just what I thought DK. This is certainly not the the way to go, can't seem to find a better alternative unless I create new pages which basically defeats the object. Regarding SEO, DRY anyway and generally the overall content flow. It does make me laugh all the messing about because of a facebook like. (:
I'll have to reassess the issue, maybe I'll get a response to my other thread
Even if it does work I'll know this approach is wrong, like writing messy code DK its not acceptable and kind of goes against everything I've learned.
Thanks for the feedback
dklynn — 2013-10-14T22:25:08-04:00 — #4
That was my take on MultiViews ... but the simple fact that it exists means that someone must like it. At least I attempted to let you know what to look for if you decide to use it after all.
computerbarry — 2013-10-17T11:52:16-04:00 — #5
I've never used MultiViews before and have no idea where to start. That's the main reason I excluded this and didn't give it much praise.
Are you saying this will be ok?
Seems like this will be the only way I can do it. I've had to put things on hold regarding new content.
Do you have any good simply resources at hand for the MultiViews or can you explain the best way?
dklynn — 2013-10-18T18:06:43-04:00 — #6
Apache.org is always the best place for Apache information: mod_negotiation's MultiViews will have the information you are seeking. If it's available there, I'm sure that someone has a good reason to use it but ...
As for me, my STRONG bias is to use Options -MultiViews so I don't have file/directory naming problems and advise others to avoid it, too.