Web Hosting Talk







View Full Version : help for making CLEAN URLS (.htaccess)


Ali Roman
08-04-2005, 04:22 AM
Hey all..

Usually I try my best to figure out things, but I failed this time.
I have tried everything, but I can get the CLEAN URLS work, I have read several tutorials and they are same for example

http://evolt.org/article/Making_cle...d_PHP/18/22880/

I have tried this one, and others but I get "Internal Server Error"..
here is the copy of error I get


Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@tutorialshome.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.33 Server at www.tutorialshome.com Port 80



I dont know whats wrong and where is the problem, here is the test url..

I would really appreciate if anyone can help here, I can give him/her access to my server to figure out the problem.

thanks.

P-nut
08-04-2005, 07:45 AM
If you're getting an ISE with mod_rewrite, it means it's not enabled on your server.

Either you or your host will need to enable it in php.ini.

netscan
08-04-2005, 03:22 PM
Or apache isn't understanding the input from .htaccess, or malformed/missing URL/page

Ali Roman
08-07-2005, 04:03 AM
thanks both for your replies.

the following code is in my .htaccess file

<Files article>
ForceType application/x-httpd-php
</Files>

and the code is my php

<? echo"testing urls"; ?>

I also tried using this
$var_array = explode("/",$PATH_INFO);
$a=$var_array[1] ;

it works without using .htaccess and removing the file extensions.

should I ask my host to enable remod_write ?
any ideas ?
thanks.

Ali Roman
08-07-2005, 04:44 AM
ok - I did another test, I placed the following code in .htaccess to display custom error pages.

ErrorDocument 404 /notfound.html

but its nor displaying this url, I have placed this notfound.html in root folder here
http://www.tutorialshome.com/notfound.html

Does it mean the .htaccess is not allowed on my server or something ?

netscan
08-07-2005, 09:41 AM
mod_rewrite is pretty standard and should be enabled by your host, the only issue that they could complain about is the extra CPU usage, which is minimal unless your rewrites are huge.

To see if it is enabled, create a file named phptest.php and add the following to it:

<?php phpinfo(); ?>

Then navigate to that page and check which modules are loaded for apache. Delete the file when you're done.

Ali Roman
08-08-2005, 05:31 AM
nah thats does not work actually, it seems that .htaccess is not working. I have placed the following code in .htaccess file

ErrorDocument 404 /notfound.html

and placed notfound.html files in root directory, it must display custom error page on page not found 404, but it does not. I tihnk ,htaccess is not configured properly, may be.

Shaliza
08-09-2005, 07:21 PM
I've been trying to do this as well, because I want site.com/content/morecontent

Shaliza
08-12-2005, 07:47 PM
Bumping this once.

ethereality
08-12-2005, 10:31 PM
I find this website useful for mod_rewrite

http://www.ecauldron.com/web/design020.php

Musoka
08-15-2005, 09:10 PM
I used a similar site for my Clean URL needs and it wasnt too helpful as the URLs didnt work once I applied the PHP...

Thanks for the URL, very useful.

Shaliza
08-17-2005, 05:09 PM
Thatnks for the link, but I have a question though: what if you're not using an e-store? I find that all these articles keep using e-store examples & I don't need mod_rewrite for one.