I have a .htaccess file in /home/ of my site.... my site's html is in /home/public_html/
Whenever I do a rewrite like
RewriteRule ^img([A-Za-z0-9]+).image/$ img.php?picid=$1 [NC]
It goes from site.com/img4.image/ to site.com/public_html/img4.image
How can I fix this?
mod_rewrite problem from / to /public_html/
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
To fix it simply reference the proper location in the second part of the rule... you simply reference img.php without indicating what folder it's in... so naturally it assumes the working directory which is why it's returning /home/
eg. /home/public_html/img.php
Be sure to also use the flag QSA and if it's the only or last rule, use the flag L.
eg. /home/public_html/img.php
Be sure to also use the flag QSA and if it's the only or last rule, use the flag L.