mod_rewrite /p/about => ?p=about
Verfasst: 13.04.2012 19:16
i have a specific question concerning mod_rewrite:
when the user calls:
but in the adress bar it should still say
My solutions that did not worked out:
1. Try:
Wrong effect, because it only works with: test.com/about, but I need test.com/p/about!
2. Try:
Error: it redirects correct but the paths on the html file are wrong: eg. /img/pic.png is now /p/img/pic.png
big thanks, stee
when the user calls:
the webserver should call internally
to access subpages of the website.
but in the adress bar it should still say
is this anyhow possible with mod_rewrite?
My solutions that did not worked out:
1. Try:
Code: Alles auswählen
RewriteRule ^/?([-a-zA-Z0-9_+]+)$ index.php?p=$1 [L]
2. Try:
Code: Alles auswählen
RewriteRule ^p/([a-zA-Z]+)$ index.php?p=$1
big thanks, stee