Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_rewrite not work |
|
Author |
|
aksan
Joined: 29 Jul 2006 Posts: 2
|
Posted: Sat 29 Jul '06 16:45 Post subject: mod_rewrite not work |
|
|
All, need your advice, I'm using WAMP, after installing WAMP i'm trying a simple code in htaccess:
Code: |
Options +FollowSymLinks
RewriteEngine On
RewriteRule google http://www.google.com/? [R,L]
|
but its not wotking?
i make it more simple, i create file named alice.html and bob.html that show alice and bob words, thus i create .htaccess file like this Code:
Code: | RewriteEngine on
RewriteRule ^alice.html$ bob.html
|
when i see write in broser mysite.com/alice.html page and content still alice.html, it should be content with bob.html, what wrong???
Actually my phpinfo() have Loaded Modules:
core mod_win32 mpm_winnt http_core mod_so mod_access mod_actions mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dir mod_env mod_imap mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_userdir mod_php5
i has mod_rewrite loaded! but still not work?
any solution?
another questions:
1. should i put my .htaccess in parent folder eg: www??
2. if i indexing the folder, htaccess ahow like this "htaccess.htaccess ", its correct? not .htaccess?
3. there is another thing that i should configure in my conf, because WAMP already AllowOverride all, load mod_rewrite.
sorry if make you all more confuse, need advice |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
|
Back to top |
|
aksan
Joined: 29 Jul 2006 Posts: 2
|
Posted: Sat 29 Jul '06 19:00 Post subject: |
|
|
I have links:
Mysite.com/index.php?page=detail&id=1
Mysite.com/index.php?page=detail&id=20
Mysite.com/index.php?page=galery&jump=thumb&kat=14&id=17
Mysite.com/index.php?page=galery&jump=thumb&kat=13&id=40
I want change to:
Mysite.com/index/detail/1.html
Mysite.com/index/detail/20.html
Mysite.com/index/galery/thumb/14/17.html
Mysite.com/index/galery/thumb/13/40.html
So I write down .htaccess like this:
RewriteEngine On
#show like index/detail/id_artikel.html
RewriteRule ^index/(.*)/(.*).html index.php?page=$1&id=$2
#show like index/galery/thumb/kat/id_gambar.html
RewriteRule ^index/(.*)/(.*)/ (.*).html index.php?page=$1&kat=$2&id=$3
all of URl friendly not working, so i test it with simple code, its still not working. as i wrote before. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 31 Jul '06 2:53 Post subject: |
|
|
Does the following work ?
RewriteRule /google http://www.google.com [R,L] |
|
Back to top |
|
|
|
|
|
|