0

i know this question is asked like a million times, but i can't seem to get it to work.

what i want is when i type the url localhost:8080/contact that it loads the localhost:8080/sample/index.php?option=com_content&view=article&id=3 page.

i have tried the following:

RewriteCond %{REQUEST_URI} contact RewriteRule ^^([-\w\.])$ sample/index.php?option=com_content&view=article&id=3 [NC,L]

but now when i do localhost:8080/contact i see the WAMP server homepage instead of the contact page.

also tried this: RewriteRule ^contact/?$ sample/index.php?option=com_content&view=article&id=3 [NC,L]

but that gives errors for some reason.

rewrite engine is on: RewriteEngine On and apache rewrite module is on.

what am i doing wrong here?

1 Answers1

0

I have found the answer, after trying all the possibilities this is what worked:

RewriteRule contact/?    /sample/index.php?id=3   [L,NC]

No conditions seem to work perfectly.

MrWhite
  • 13,315