|Can Dreamweaver MX handle PHP files with no extension?|
Can Dreamweaver MX handle PHP files with no extension?
| 1:06 am on Jan 29, 2004 (gmt 0)|
In an earlier post (here: [webmasterworld.com...] ) which is now locked, geckofuel asked about Dreamweaver's problem dealing with files which have no extenstions (i.e. no dot in the file name). jatar_k responded suggesting that geckofuel simply enable php parsing for the html extension.
I am having the same problem. I'm not trying to hide the extension from anyone except seach engine bots that don't like to index pages with variables passed via the query string and don't like to index pages that have an illegal dot in the name.
For example, I have the page: www.example.com/script.php?article=123
Search engines won't index the page because of the "?" in the URL. So, I switch to using Apache's "look back" feature:
I can now parse the article value (123) from the string using PHP's explode function:
$vars = explode("/", $PATH_INFO);
$article = $vars; // FYI: $vars = "script.php"
But there is still a problem: Many search bots see that this is technically an invalid URL because of the dot in the middle of it. So, I direct Apache to "ForceType" in .htaccess:
Now I can use the URL:
www.example.com/script/123 and everybody's happy except Dreamweaver, which will not open, save, upload or download the file because it has no extenstion.
Please encourage Dreamweaver to add the ability to work with files that have no extension, please submit a bug report:
[edited by: jatar_k at 9:32 pm (utc) on Jan. 29, 2004]
[edit reason] fixed link [/edit]
| 10:20 am on Jan 29, 2004 (gmt 0)|
|Search engines won't index the page because of the "?" in the URL. So, I switch to using Apache's [...] |
This is an arcane idea; all the major search engines are thoroughly adept at handling query strings, usually to two or three variables.
Also, for semantics sake, it would surely be a good idea to maintain extensions for your various code files, so you can see at a glance which language they purport to be in. You could easily hide the exntension through php code and an Apache RewriteRule.
| 11:02 am on Jan 29, 2004 (gmt 0)|
I recently moved a bunch of pages around using .htaccess, I was using the exact same strategy - turning my page.htm?var=foo into page/foo.htm
Those pages were all Googlebotted, then promptly (within a week) slammed with a PR0. I can't be sure if it was the Apache noodling that caused the Googewrath, but it seems like the most plausible explanation.
so, be careful...
| 12:26 pm on Jan 29, 2004 (gmt 0)|
I have had pages indexed easily by Google and others with up to 3 strings.
You wont have any problem with 1 string
Google is actually no spidering some session pages which is worse the php values.
Just one tip name your variables carefully, keep them to about 4 characters and don't just use ID= name it differently like myid=
Hope it helps
| 3:06 pm on Jan 29, 2004 (gmt 0)|
|Those pages were all Googlebotted, then promptly (within a week) slammed with a PR0. I can't be sure if it was the Apache noodling that caused the Googewrath, but it seems like the most plausible explanation. |
This is [at least in my mind] certainly not the reason, as I only recently (last three months) configured an ecommerce site to move from file.ext?one=two&three=four to the spinky /two/four/file.ext -- these now vary between PR4 and 5, depending on the page. I can't attribute this to lincoming links, as there are few, but its clear that set up correctly, apache's rewrites won't be hindered by Google [or indeed, any other] algorithms, simply because its all server side, and google won't know about them.
| 9:02 pm on Jan 29, 2004 (gmt 0)|
Well, I want to make sure that all search bots can spider my site, so I'm going to move to the "archaiac" method of passing variables via the url.
Regardless, Dreamweaver needs to be able to deal with filenames that have no extenstion.
| 9:17 pm on Jan 29, 2004 (gmt 0)|
WibbleWobble, I can't speak for your situation, but that "PR0" on dynamic pages may not be real. I have a number of dynamic pages that have shown no PR for months but perform well in slightly competitive searches.
| 9:46 pm on Jan 29, 2004 (gmt 0)|
Well there seem to be a ton of strangely related topics in this thread so let's see if we can throw a little light on the whole thing.
|Dreamweaver's problem dealing with files which have no extenstions |
Well, windows can't deal with files without extensions either.
have you thought using mod_rewrite to change
|all the major search engines are thoroughly adept at handling query strings, usually to two or three variables. |
I would say 2 max and if you have a way of rewriting them or getting rid of them all together then you are better off.
|I can't be sure if it was the Apache noodling that caused the Googewrath |
It definitely wasn't, I'm with rogerd.
good advice lasko, as mentioned by Googleguy and also by many other people, session id's can cause some issues with spidering.
If you do decide on mod_rewrite take a look at
An Introduction to Redirecting URLs on an Apache Server
For mod_rewrite beginners [webmasterworld.com]
| 8:18 pm on Feb 13, 2004 (gmt 0)|
FYI, EditPlus lets you configure a default syntax highlighting to be applied to files with no extension. I too use the ForceType trick to build querystring-less URLs with Apache+PHP, and EditPlus works just great for me. I only use DW to lay out visually what is not so easily done "by hand" (such as table design and so on). ;)
About forcing the content type, a word of warning: images must not be served as text/html (unless you were looking for problems), so you'd better use something like this: ForceType application/x-httpd-php