View Single Post
Old 05-06-2018, 09:14 PM  
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
strange .htaccess issue

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.
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote