/    Sign up×
Community /Pin to ProfileBookmark

Apache RewriteEngine

I’m running Apache 2 on my machine. When I had an .htaccess file with nothing more than “RewriteEngine On” and that ends up giving me an internal server error. Does anyone know what I’m doing wrong?

to post a comment
Full-stack Developer

3 Comments(s)

Copy linkTweet thisAlerts:
@MstrBobNov 01.2005 — Make sure you've got the RewriteModule loaded. In your httpd.conf file ('conf/httpd.conf'), make sure you uncomment it. It should look like this:

<i>
</i>LoadModule rewrite_module modules/mod_rewrite.so


[b]Without[/b] the hashmark in front.
Copy linkTweet thisAlerts:
@FeelLikeANutauthorNov 01.2005 — Ok, that did it. Thanks. I don't suppose there would be any way for me to load the module through htaccess so that I don't have to go through an administrator to get it on another server?
Copy linkTweet thisAlerts:
@MstrBobNov 01.2005 — No, these modules need to be loaded when apache starts.

Besides, even if it was possible, it would be a performance hit. Your .htaccess file is read on each request made to the server, so the server would be constantly loading/unloading this module. Not very efficient, eh?
×

Success!

Help @FeelLikeANut spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...