-
- 7 Posts
hi,
i just received an email from the support team of the hosting company i'm using, and they don't want to enable mod_rewrite. is it actually difficult to enable it for a certain domain only? and can it be done any other way? thanx
I don't think you can do that via .htaccess, as it requires a module to be loaded into Apache. Hopefully someone who is more welled versed than I can answer this question better.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
- 680 Posts
It does require an apache module but mod_rewrite comes as an pre-installed module in most Apache installs.
You can turn the mod_rewrite engine on and off at either a VirtualHost level or .htaccess level.
I don't know of any other way to do mod_rewrite if the host won't enable it for you. About the only thing I can think of would be to set your 404 file as a custom php script that would check the requested url against the aliases in the database and redirect appropriately. But that is a REALLY UGLY way of getting things done and the address bar still wouln't show the alias.
You could also set up a bunch of redirects in your .htaccess but that would be a maintenance nightmare, and again no human friendly urls in the address bar.