This is a discussion on Mod_rewrite, small problem within the Apache Web Server forums, part of the Web Server and Related Forums category; Greetings, I have a small problem with mod_rewrite. The rewriting works well, when a user calls http://mywebsite/home.html ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Greetings,
I have a small problem with mod_rewrite. The rewriting works well, when a user calls http://mywebsite/home.html the serve returns well "http://mywebsite/index.php?p=home". My problem is that the adress bar shows "http://mywebsite/index.php?p=home" when I'd like it to show "http://mywebsite/home.html". How can I get around this ? Thanks in advance Folks, Ludovic |
|
|||
|
"Ldesert" <ludovic.desert@gmail.com> schreef in bericht
news:1165238727.407296.215030@j44g2000cwa.googlegr oups.com... > The rewriting works well, when a user calls http://mywebsite/home.html > the serve returns well "http://mywebsite/index.php?p=home". > My problem is that the adress bar shows > "http://mywebsite/index.php?p=home" when I'd like it to show > "http://mywebsite/home.html". > How can I get around this ? > I hope my cristal ball still works ... .... drop the [R] flag on your rewriterule. HansH |
|
|||
|
"shimmyshack" <matt.farey@gmail.com> schreef in bericht
news:1165239987.761998.57730@79g2000cws.googlegrou ps.com... > ha nice one! Not nice is your habbit to not quote the part of the previous post you're reflecting to. It makes reading a thread very hard for those not using a web frontend. HansH |
|
|||
|
HansH wrote: > "shimmyshack" <matt.farey@gmail.com> schreef in bericht > news:1165239987.761998.57730@79g2000cws.googlegrou ps.com... > > ha nice one! > Not nice is your habbit to not quote the part of the previous post you're > reflecting to. > It makes reading a thread very hard for those not using a web frontend. > > HansH point taken, thanks for the heads-up |
|
|||
|
Well thanks for the answer Hans buuuuut unfortunatly it doesn't work.
My htaccess is as follows : ------begin------- RewriteEngine on RewriteRule ^([a-z]+)\.html$ http://mywebsite.com/myFolder/index.php?p=$1 --------end ---------- and still the adress bar shows "http://mywebsite/index.php?p=home" when I'd like it to show "http://mywebsite/home.html". help ? :) HansH a écrit : > "Ldesert" <ludovic.desert@gmail.com> schreef in bericht > news:1165238727.407296.215030@j44g2000cwa.googlegr oups.com... > > The rewriting works well, when a user calls http://mywebsite/home.html > > the serve returns well "http://mywebsite/index.php?p=home". > > My problem is that the adress bar shows > > "http://mywebsite/index.php?p=home" when I'd like it to show > > "http://mywebsite/home.html". > > How can I get around this ? > > > I hope my cristal ball still works ... > ... drop the [R] flag on your rewriterule. > > HansH |
|
|||
|
"Ldesert" <ludovic.desert@gmail.com> schreef in bericht
news:1165310439.421943.182640@j72g2000cwa.googlegr oups.com... > > The rewriting works well, when a user calls http://mywebsite/home.html > > the serve returns well "http://mywebsite/index.php?p=home". > > My problem is that the adress bar shows > > "http://mywebsite/index.php?p=home" when I'd like it to show > > "http://mywebsite/home.html". > > How can I get around this ? > > > I hope my cristal ball still works ... > ... drop the [R] flag on your rewriterule. > > My htaccess is as follows : > RewriteEngine on > RewriteRule ^([a-z]+)\.html$ > http://mywebsite.com/myFolder/index.php?p=$1 Test for me RewriteEngine on RewriteRule ^([a-z]+)\.html$ index.php?p=$1 HansH |
|
|||
|
yoohoo!! it works!
well it works when I put this rule : RewriteEngine on RewriteRule ^([a-z]+)\.html$ /myFolder/index.php?p=$1 A big big thank you Hans! Have a pleasant day! HansH a écrit : > "Ldesert" <ludovic.desert@gmail.com> schreef in bericht > news:1165310439.421943.182640@j72g2000cwa.googlegr oups.com... > > > The rewriting works well, when a user calls http://mywebsite/home.html > > > the serve returns well "http://mywebsite/index.php?p=home". > > > My problem is that the adress bar shows > > > "http://mywebsite/index.php?p=home" when I'd like it to show > > > "http://mywebsite/home.html". > > > How can I get around this ? > > > > > I hope my cristal ball still works ... > > ... drop the [R] flag on your rewriterule. > > > > My htaccess is as follows : > > RewriteEngine on > > RewriteRule ^([a-z]+)\.html$ > > http://mywebsite.com/myFolder/index.php?p=$1 > > Test for me > RewriteEngine on > RewriteRule ^([a-z]+)\.html$ index.php?p=$1 > > HansH |