[thelist] Mod_rewrite

Pete Freitag pf at cfdev.com
Thu Feb 19 15:32:11 CST 2004


live4bacon at optonline.net wrote:

>Can someone please help me out, I am trying to use the mod_rewrite module and I am having no luck.
>
>How do I check if it is turned on?  If it is not can I turn it on with a command in htaccess?
>
>  
>
If your the server admin you can run mod_info, and then goto 
http://server/server-info and see if mod_rewrite shows up. If the module 
is not loaded, in the httpd.conf, I don't think you can load it from a 
htaccess file. But if the module is loaded, then you just use 
RewriteEngine On - to turn it on.

>Secondly how would I redirect all traffice going to:
>
>http://mysite.com/olddirectory/
>
>(And below)
>
>to http://mysite.com/newindex.html
>
>  
>
RewriteEngine On
RewriteRule ^/olddirectory /newindex.html

______________________________________
Pete Freitag
http://www.cfdev.com/
Author of the CFMX Developers Cookbook
http://www.petefreitag.com/bookshelf/






More information about the thelist mailing list