473,511 Members | 10,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Clean Urls Suddenly Not Working - No Input File Specified

35 New Member
I've been using apache and php to create clean urls for a while, and suddenly the other day it just stopped working. My host is godaddy.com and I think this might be the source of my trouble, but I'm not sure what exactly that trouble is. Here is my .htaccess file:
Expand|Select|Wrap|Line Numbers
  1. AddHandler x-httpd-php5 .php
  2. AddHandler x-httpd-php .php4
  3.  
  4. <FilesMatch "^comic$|^post$|^characters$|^extras$">
  5.     ForceType application/x-httpd-php
  6. </FilesMatch>
  7.  
I have a vague understanding of how this works (it was a cut and paste on my part I'm sorry to say - this just seems to go over my head every time I try to get it, and before now, it simply worked). From what I know of it, it looks for the words comic, post, characters, or extras, and adds .php to the end of them internally so it can be recognized as a valid page. My php page explodes the URL (which is in the form of, say, sitename.com/folder/comic/1), and puts that in an array (so 1, which is the comic_id, would be array[3]). I am fairly certain the php end of things is fine, and that it's apache/.htaccess giving me trouble since I simply get the message "No input file specified." when I try to use a clean url (index pages load fine).

This was working fine as early as last week (I think - I've been pretty busy lately), but is suddenly not.

Anyone see where my mistake is, or is this something godaddy may have changed on their end that's making this not work?
Mar 19 '08 #1
3 3913
d3vkit
35 New Member
I've decided to scrap my previous method and try my hand at actual mod_rewrites - but am running into the same issue.

Expand|Select|Wrap|Line Numbers
  1. RewriteRule ^http://www.site.com/directory/fake_dir/([0-9]+)/$ http://www.site.com/directory/index.php?id=$1
  2.  
From what I understand, this ought to take anything such as site.com/dir/fake_dir/1 and make it site.com/dir/index.php?id=1, but I'm still get a no input file specified error. My host, godaddy, runs PHP as CGI and not a module, maybe that's the problem? It specifically says in help:
For security reasons, we run PHP as a CGI and not as a module. Because of this and the version of Apache we run (1.3.3), you cannot use extensionless PHP files on your Web site without employing a tool like mod_rewrite.
But I AM using mod_rewrite. It seems it's just not seeing the fake_dir (since it doesn't exist) - I was hoping it would simply try to find what I was mod_rewriting to. I'm so new to this, it's hard to tell if I'm doing things right. Any suggestions?
Mar 20 '08 #2
d3vkit
35 New Member
Well, I figured it out, and thought I'd share the little things I had done wrong just in case this comes up in a Google search or something.

1. I upgraded my hosting to Deluxe Linux with multiple hosting, so I can seamlessly use folders in my root and direct my different domains to those folders. I realized later on that .htaccess will take care of this with a little work, but I suppose the extra $3 a month is worth making it easy.

2. I had multiple .htaccess files (this one is pretty stupid). I normally will take an old file and simply put .OLD on it, so it doesn't register but I don't have to delete in and I can just upload my new file. I think this messed things up since .htaccess starts with a period. This probably won't come up for anyone but me :P

3. I was trying to have fake directory's but I had FILES with those directory names - such as site.com/fake_dir/id, and I had a file called fake_dir.php. It was trying to use that, not sure why. (I had previously been using a different method which involved having these files with includes of the index. They were useless after I figured out how to do actual mod_rewrite.)

After fixing each of these things, I have mod_rewrite working great, and am really happy with the level of control I have now.
Mar 24 '08 #3
jkspin
1 New Member
Hi! I have deluxe hosting with GoDaddy, and have not been able to get clean urls working on any of my 'sub' sites (in folders in root). If you have had success I would really appreciate knowing how you have got it to work. I've tried lots of different .htaccess permutations with no success so far.

Thanks, John S.
Jun 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2066
by: somaboy mx | last post by:
I'm looking for a way to come up with clean urls like http://www.mysite.com/products/233 instead of http://www.mysite.com/products.php?pid=233 without having to rely on mod_rewrite or other...
7
4392
by: Creative Acceleration | last post by:
Hi all, I need to convert the Query Strings into Clean URLs, Found some articles on PHP and Apache server.. How do we it them with ASP ?? Thanks Kart
7
2227
by: Felix Kater | last post by:
Hi, when I need to execute a general clean-up procedure (inside of a function) just before the function returns -- how do I do that when there are several returns spread over the whole function?...
12
1716
by: melanieab | last post by:
Hi, I have a button that, when clicked, saves all the info entered. It worked fine until suddenly it didn't, and I have no idea why. I get the error An unhandled exception of type...
26
2258
by: Robert Baer | last post by:
The following passes the test as valid, and the mouseover for the six indicated areas also work. I need various areas to link to another page, including the six mentioned. However either the MAP...
5
1791
by: fakeprogress | last post by:
For a homework assignment in my Data Structures/C++ class, I have to create the interface and implementation for a class called Book, create objects within the class, and process transactions that...
10
4893
by: jflash | last post by:
Hello all, I feel dumb having to ask this question in the first place, but I just can not figure it out. I am wanting to set my site up using dynamic urls (I'm assuming that's what they're...
1
2233
by: luttkens | last post by:
I'm using mod_rewrtie to have nice look urls. One of my rules are: RewriteRule ^category/(+)/?$ /tidskrifter_lista.php?category=$1 ..which turns www/category/misc into...
8
2884
by: raamay | last post by:
i have been trying a hell lot to achieve the task of cleaning my urls but has not been able to succed. I downloaded the example codes from...
0
7251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1581
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.