[SOLVED] .htaccess disappeared, and wont work properly
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a server running Debian, and it's running PHP5, apache2, mysql and pure ftp... but when i upload .htaccess and press F5 the .htaccess file disappears... but i it still there.
the .htaccess file look like this
Code:
RewriteEngine on
RewriteRule ^php_show/([^/]+)/?$ php_show.php?id=$1
But when i create the php_show.php
with content
PHP Code:
<?php
print_r($_GET);
?>
then go to the url http://(server ip)/php_show/test
it returns
Your RewriteRule works here: It gives: Array ( [id] => test)
Are you sure you're using the correct .htaccess? Because you say that after uploading you cannot see it anymore, it could be that you don't have permissions to overwrite it and you're using a wrong .htaccess.
Yes, but are you sure that the existing .htaccess is overwritten by the one you are uploading?
Could you download it back to see if it's the correct one?
Leave the "Deny from all" the way it was, because otherwise .htaccess could be downloaded/viewed from others.
What ftp client are you using? Are you sure it can show "hidden" files (files that stat with a dot)?
Anyway, could you try the following rule and see if it works?
So, is the .htaccess you've downloaded the same as the one you're trying to use and it's not working?
And if yes, are you sure it's not your browser cache that gives you always the same page?
Try this:
Code:
RewriteRule ^php_show/(.*)$ /php_show.php?blah=$1
and see what you get
BTW you can enable rewrite logging to find out what happens with your rule. To do so, add in httpd.conf the following
i want to say i used this tut to setup my server http://www.howtoforge.com/perfect-se...nny-ispconfig3
can it have anything to do with it?
i have also installed ffmpeg and flvtool2
but i think i dont know how to use ISPconfig properly
According to the tutorial you've followed, mod_rewrite is eanbled.
So you have to check if there is a "AllowOverride all" in /etc/apache2/apache2.conf or in /etc/apache2/sites-enabled/000-default.
Or, you can put the rewrite stuff directly in /etc/apache2/sites-enabled/000-default and restart apache to see if .htaccess is the problem
etc/apache2/sites-available/000-default <- is empty on my server, but i think it's ISPconfig that is doing it, so i think i will formate my server and not install ISPconfig
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.