Jump to content

php and .htaccess rewrite


Recommended Posts

I am trying to rewrite this link to

 

http://sunerandgarcia.com/clients/oster2/index.php?action=portfolio-single&portfolio_id=IL_ipJBKRg4zlbefl3AU9zZvj6OjmQGErnI1iVDRWbU

 

to

 

http://sunerandgarcia.com/clients/oster2/port/IL_ipJBKRg4zlbefl3AU9zZvj6OjmQGErnI1iVDRWbU

 

I wrote the following rule 

RewriteRule    ^port/(.*)/?$   ./index.php?action=portfolio-single&portfolio_id=$1     [NC,L]   

But when i go to the link it does not load the images or stylesheets. All the images come with the directory port so that is why it is not loading. i tried putting the ./ before index, but it did not fix anything. 

 

 

Link to comment
https://forums.phpfreaks.com/topic/276954-php-and-htaccess-rewrite/
Share on other sites

Fix the links for all your images and stylesheets and whatnot to use a leading slash. Without actually looking I imagine most of your files are in /clients/oster2 and your links have "folder/image.png" corresponding to the full path /clients/oster2/folder/image.png. Use the full path instead.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.