Visa ett inlägg
Oläst 2013-05-02, 19:00 #1
linus1 linus1 är inte uppkopplad
Medlem
 
Reg.datum: Jan 2004
Inlägg: 70
linus1 linus1 är inte uppkopplad
Medlem
 
Reg.datum: Jan 2004
Inlägg: 70
Green Flag Rewrite Base & WAMP

Hello!

Har skrivit en fråga på Stackoverflow dock dåligt med svar.. Frågar här istället


I have an WAMP webserver with Rewrite module activated.

I have all my projects in:

d:/prj/costumer1/www/ (alias: costumer1)
d:/prj/costumer2/www/ (alias: costumer2)
and so on...

For costumer1 I have an .htaccess-file that works just fine. Looking like this:

RewriteEngine on
RewriteBase /costumer1/
RewriteRule ^([^/\.]+)/?$ index.php?a=$1 [QSA]
RewriteRule ^([^/\.]+)/?/([[a-zA-Z0-9_-]+)$ index.php?a=$1&b=$2 [QSA]
RewriteRule ^([^/\.]+)/?/([[a-zA-Z0-9_-]+)/?/([[a-zA-Z0-9_-]+)$ index.php?a=$1&b=$2&c=$3 [QSA]

Now when I create a src/href-link I now have to use:

/costumer1/search/book/novell
(aka: costumer1/?a=search&b=book&c=novell)

instead of

/search/book/novell
(aka: costumer1/?a=search&b=book&c=novell)

So in short: I don't want to write "/costumer1" in front of every link: <a href="/costumer1/search/">search</a>
linus1 är inte uppkopplad   Svara med citatSvara med citat