[TIP] Site crashes, error, etc after trying to implement mod_rewrite pretty URL
Posted: Sat Mar 27, 2010 2:28 am
Can't believe I haven't seen this discussed before.
What happens if you try to implement mod_rewrite and your site stops working?
This is what happens. When you try to implement pretty URLs using mod_rewrite you naturally have to add things to .htaccess. That is where the problem comes from.
First of all, be aware of save errors when editing that file. If you try to edit the file using the File Manager from hosting, or by using the "edit" function of your FTP client (even Filezilla!), when you save that file errors will happen. New lines will not be handled properly. What you saw on screen is not what will be written to the file.
Also, and this is idiotic, you might not get a notification if you think you wrote to config.php, but it's file permissions do not allow writing to it.
Additionally, equally idiotic, is that EVEN A SINGLE CHARACTER OFF in the .htaccess file will always CRASH YOUR WEBSITE.
In particular, while it is suggested, the following lines
may or may not break your website.
Also, might have to be modified if you are not in the root of the server.
What happens if you try to implement mod_rewrite and your site stops working?
This is what happens. When you try to implement pretty URLs using mod_rewrite you naturally have to add things to .htaccess. That is where the problem comes from.
First of all, be aware of save errors when editing that file. If you try to edit the file using the File Manager from hosting, or by using the "edit" function of your FTP client (even Filezilla!), when you save that file errors will happen. New lines will not be handled properly. What you saw on screen is not what will be written to the file.
Also, and this is idiotic, you might not get a notification if you think you wrote to config.php, but it's file permissions do not allow writing to it.
Additionally, equally idiotic, is that EVEN A SINGLE CHARACTER OFF in the .htaccess file will always CRASH YOUR WEBSITE.
In particular, while it is suggested, the following lines
Code: Select all
Options +FollowSymLinks
Options -Indexes
ServerSignature Off
Also,
Code: Select all
RewriteBase /