I' trying to install sweetcron and it needs mod_rewrite enabled. So, what's the easiest way to do this on Fedora 17?
The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.
In PHP, there is an inbuilt function called 'phpinfo'. By using this function, we can output all the Loaded Modules and see the 'mod_rewrite' is enabled or not. Syntax: phpinfo();
Yes, RewriteEngine and RewriteBase have to be specified only once. Save this answer. Show activity on this post. Without a RewriteBase / apache will probably guess incorrectly whether dir2/$1 is a file or URI path and redirect you to the wrong place.
Edit your httpd.conf
(by default it lies in /etc/httpd/conf/
)
Change option AllowOverride None
to AllowOverride All
After that restart your Apache server.
You can test your rewrite engine by some simple redirect:
Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://stackoverflow.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With