View Single Post
Old 05-07-2018, 06:55 AM  
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
Quote:
Originally Posted by freecartoonporn View Post
i am trying to rewrite urls on WAMP using .htaccess

i want this

Code:
www.example.com/item/1234
to redirect to this

Code:
www.example.com/item.php?id=1234
so i have this in my .htaccess

Code:
RewriteEngine On

RewriteRule ^item/([0-9]+)$ item.php?id=$1  [L]
but now all internal links are prefixed with /item/

this

Code:
<link rel="stylesheet" href="css/style.css">
becomes this

Code:
<link rel="stylesheet" href="item/css/style.css">
this is the first time i am having this kind of issue.,
i have used same config in nginx and it used to work fine on lemp.

but on wamp its screwing all the relative links.

what is wrong ?


i know i can define base url in html, but i want to know what is messing this and why now ?

is it wamp ?


Thanks for your time.
mod_negotiation - Apache HTTP Server Version 2.4
Try disabling this, you probably have it on.
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote