andrepcg Posted February 6, 2009 Share Posted February 6, 2009 i have: Options +FollowSymlinks RewriteEngine on RewriteRule ^u/([A-Za-z0-9-]+)?$ http://zzzzzz.info/user.php?n=$1 [L] but when i load http://zzzzzz.info/u/blablabla it automatically redirects to http://zzzzzz.info/user.php?n=blablabla instead of rewriting the url. when i load the short url it changes the page to the long url. how can i make it to work right? i dont want it to redirect but i want it to rewrite... Link to comment https://forums.phpfreaks.com/topic/144084-htaccess-is-not-rewriting-but-redirecting/ Share on other sites More sharing options...
corbin Posted February 6, 2009 Share Posted February 6, 2009 Try using /user.php instead of http://...... Link to comment https://forums.phpfreaks.com/topic/144084-htaccess-is-not-rewriting-but-redirecting/#findComment-756319 Share on other sites More sharing options...
andrepcg Posted February 6, 2009 Author Share Posted February 6, 2009 doesn't work without http:// i have 404 error Link to comment https://forums.phpfreaks.com/topic/144084-htaccess-is-not-rewriting-but-redirecting/#findComment-756324 Share on other sites More sharing options...
corbin Posted February 6, 2009 Share Posted February 6, 2009 The two domains aren't the same then. Shouldn't make a 404 error. Link to comment https://forums.phpfreaks.com/topic/144084-htaccess-is-not-rewriting-but-redirecting/#findComment-756374 Share on other sites More sharing options...
andrepcg Posted February 6, 2009 Author Share Posted February 6, 2009 i figured it out. it's because i was using a sub folder... how can i make it work with a sub folder? Link to comment https://forums.phpfreaks.com/topic/144084-htaccess-is-not-rewriting-but-redirecting/#findComment-756425 Share on other sites More sharing options...
corbin Posted February 7, 2009 Share Posted February 7, 2009 Confused as to what you mean. Can you tell me your exact URLs (use a fake domain name is you want) and your current rewrite rule? Link to comment https://forums.phpfreaks.com/topic/144084-htaccess-is-not-rewriting-but-redirecting/#findComment-756442 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.