Print this page

Apache .htaccess and mod_rewrite

Untitled document

For the great and stable Apache, the several weaknesses I encountered with mod_rewrite and .httaccess seem to be illogical.

1) The two different formats in 301 redirect seem illogical. For example,

redirect 301 /firefox/firefox_downloading.html http://mkrd.info/?page=2-files-limit-fix

everything I have read states that the first path must be relative (/firefox), while the second one must specify the full http:// path, not another relative one.

2) It is much fun trying to associate or edit a file Windoza thinks has no filename (only an extension)

3) A single slash in one of the 301 redirects will completely crash your server and everything that is in it, returning a 500 error until it is fixed. In the example above,

redirect 301 /firefox/firefox_downloading.html /http://mkrd.info/?page=2-files-limit-fix

the slash before http will do it.

4) At least on my server, the CMS Made Simple suggested settings

#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

if enabled, will crash the server.

 

I would think that .htaccess would at least scan for such possibilities and ignore or warn about them rather than making the whole site unavailable (which is always fun and good for silver looking hair).

 

Please note that if you have a problem with .htaccess and mod_rewrite, you can contact me for help. I have obviously got them working, but not without some work first.


 

I strive to make this website very useful to every visitor. If you would like to comment on this page, ask a question, or suggest a topic for me to research, then contact me. A little reward for me will be appreciated if you will visit my Services pages. Links to my website are desperately needed. If you have a blog, a website, or participate on a forum please link to pages that you have found useful. Site Map.

Add A Comment

Add A Comment

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)
Code in the picture:
Title:
Your Name(*):
Email:
Notify me of any further comments to this thread:
Website:
Comment(*):