unemployment Posted August 3, 2012 Share Posted August 3, 2012 I just changed servers and now two of my mod rewrite rules no longer work, but I have no idea why. Do you have any idea why these rules wouldn't work? RewriteRule ^u/(.*)$ /profile.php?u=$1 [QSA,L] RewriteRule ^c/(.*)$ /company.php?c=$1 [QSA,L] Link to comment https://forums.phpfreaks.com/topic/266656-mod-rewrite-used-to-work-now-fails/ Share on other sites More sharing options...
requinix Posted August 4, 2012 Share Posted August 4, 2012 Don't work how? Link to comment https://forums.phpfreaks.com/topic/266656-mod-rewrite-used-to-work-now-fails/#findComment-1366703 Share on other sites More sharing options...
unemployment Posted August 6, 2012 Author Share Posted August 6, 2012 I actually sort of fixed it. Mod Rewrite wasn't enabled on my server so I enabled it. Then I had to configure the sites-available / sites-enabled config files in the apache folder. However, I am still having issues. For some reason my blog mod rewrite isn't working. RewriteRule ^blog/([0-9]+)/(.*)$ /blog.php?post_id=$1&title=$2 [L] When I visit my blog page and write: echo $_GET['post_id']; die(); Nothing is returned. In order for a user to go to an individual blog page I need that id returned. Any idea as to what I am missing? Link to comment https://forums.phpfreaks.com/topic/266656-mod-rewrite-used-to-work-now-fails/#findComment-1367075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.