ionik Posted June 16, 2008 Share Posted June 16, 2008 OK! I have developed a full CMS and now I am doing some custom work for someone and they want the pretty URLS...argh now i allready wrote out all the rewrite rules....theres alot....but the problem is now is that images no longer show up and the css style are gone. now everything is parsed through one index.php file how do i make apache understand that the links for images and css are correct. I've searched and the only thing i could find is make the image path direct but that would be impossiable at this point for an entire CMS theres thousands of images i would need to change....dont have time for that. Is it possiable to do this? or is the only way to is link images instead of images/whatever/img.gif to /subdir/images/whatever/img.gif Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted June 20, 2008 Share Posted June 20, 2008 i just tackled a similar idea replace with your full context the rewriteconditions in the first rewriterule provide pages to not be rewritten admin.php allows me to manage the CMS the don't rewrite index.php is to prevent an infinite loop issue the below issues handles all php pages that aren't labeled as examples mysite.com/archives/ mysite.com/gallery use as needed for pretty urls it only will rewrite php pages Options +FollowSymLinks Options +Indexes RewriteEngine on RewriteBase / RewriteCond %{SCRIPT_FILENAME} !=/hsphere/local/home/****/****.org/admin.php [NC] RewriteCond %{SCRIPT_FILENAME} !=/hsphere/local/home/*****/*****.org/index.php [NC] RewriteRule ^(.+)\.php$ index.php?Page_Request=$1&request=1 [QSA,L] RewriteRule ^about/$ index.php?Page_Request=about/index [NC,L] RewriteRule ^about$ index.php?Page_Request=about/index [NC,L] RewriteRule ^archives/$ index.php?Page_Request=archives/index [NC,L] RewriteRule ^archives$ index.php?Page_Request=archives/index [NC,L] RewriteRule ^Events/$ index.php?Page_Request=events/index [NC,L] RewriteRule ^Events$ index.php?Page_Request=events/index [NC,L] RewriteRule ^gallery/$ index.php?Page_Request=gallery/index [NC,L] RewriteRule ^gallery$ index.php?Page_Request=gallery/index [NC,L] Quote Link to comment Share on other sites More sharing options...
ionik Posted June 23, 2008 Author Share Posted June 23, 2008 ...complicated things can be so easily solved....thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.