/    Sign up×
Community /Pin to ProfileBookmark

Problem about install mod_rewriter

This is the first time that I use mod_rewrite …….I have question about install mod_rewrite. I php and Apache and run locally on my window xp. My question is that I install Apache_2.0.55-win32-x86-no_ssl I read from most tutorial it said

Uncomment LoadModule rewrite_module modules/mod_rewrite.so and AddModule mod_rewrite.c. The problem is when I open httpd.cofg, I don’t have AddModule mod_rewrite.c. so what should I do….I tried to add AddModule mod_rewrite.c. But that cause server can not run.

What should I do any comment.

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@ScleppelNov 22.2005 — I don't think the "AddModule" line matters if you don't already have it, neither of my installs have any "AddModule" lines (i have mod_rewrite enabled on both).
Copy linkTweet thisAlerts:
@gop373authorNov 23.2005 — So what should I do next ?????


I created the .htaccess file in this path [B]C:Program FilesApache GroupApache2htdocs.htaccess [/B] is it the right place ??? My actual project is in this path C:TestAssmark.php.

in .htaccess i wrote
RewriteEngine on

RewriteRule ^Ass/mark/([0-9]+)$ /Ass/mark.php?GroupID=$1 [L] [/QUOTE]


Then restart Apache.......But the problem is when I open file php.....it still shows http://localhost/Ass/mark.php?ID=1

Do I miss anything.....what should I do any comment !!! ? ?
Copy linkTweet thisAlerts:
@bokehNov 23.2005 — .htaccess generally goes in the root directory but can also go in sub directorys if it is only to affect that directory and its desendents. A server restart is not required after changes to .htaccess.
Copy linkTweet thisAlerts:
@SpectreReturnsNov 24.2005 — Put the lines into your httpd.conf to make the global changes required for most mod_rewrite stuff.
Copy linkTweet thisAlerts:
@gop373authorNov 24.2005 — You mean put this line

[B]RewriteEngine on

RewriteRule ^Ass/mark/([0-9]+)$ /Ass/mark.php?GroupID=$1 [L] [/B]


in httpd.conf ????
Copy linkTweet thisAlerts:
@bokehNov 24.2005 — You mean put this line

[B]RewriteEngine on

RewriteRule ^Ass/mark/([0-9]+)$ /Ass/mark.php?GroupID=$1 [L] [/B]


in httpd.conf ????[/QUOTE]
I wouldn't unless you can think of a good reason. What about when you run the site from an environment where you don't have control over httpd.conf?

The above should work fine but you need to look at your rewrite rule. For example no leading slash.

For excellent info on mod_rewrite there is a [URL=http://www.doriat.com/]forum and website[/URL] completely devoted to it.
×

Success!

Help @gop373 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.26,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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