limitphp Posted January 30, 2009 Share Posted January 30, 2009 I figure it'll probably be something like: RewriteRule ^page([0-9]+)/?$ index.php?currentpage=$1 [NC,L] the only thing is, that rule will put the word page and the number in for the querystring, won't it? How do I just grab the number? thanks Quote Link to comment https://forums.phpfreaks.com/topic/143150-solved-need-help-rewriting-indexcompage2-to-indexphpcurrentpage2/ Share on other sites More sharing options...
phparray Posted January 30, 2009 Share Posted January 30, 2009 Here is an awesome tool for that. http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml Quote Link to comment https://forums.phpfreaks.com/topic/143150-solved-need-help-rewriting-indexcompage2-to-indexphpcurrentpage2/#findComment-750762 Share on other sites More sharing options...
limitphp Posted January 30, 2009 Author Share Posted January 30, 2009 Here is an awesome tool for that. http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml thank you, but I'm at work, and unfortunately the site is blocked. It doesn't seem to work with the proxy I'm using. Quote Link to comment https://forums.phpfreaks.com/topic/143150-solved-need-help-rewriting-indexcompage2-to-indexphpcurrentpage2/#findComment-750771 Share on other sites More sharing options...
limitphp Posted January 30, 2009 Author Share Posted January 30, 2009 Actually, now that I think about it....what I had originally might work. Quote Link to comment https://forums.phpfreaks.com/topic/143150-solved-need-help-rewriting-indexcompage2-to-indexphpcurrentpage2/#findComment-750772 Share on other sites More sharing options...
limitphp Posted January 30, 2009 Author Share Posted January 30, 2009 I don't understand...I think the syntax is right on my mod rewrite. It takes me to the index page, but its not returning any value. Does anyone know whats wrong here? Quote Link to comment https://forums.phpfreaks.com/topic/143150-solved-need-help-rewriting-indexcompage2-to-indexphpcurrentpage2/#findComment-750782 Share on other sites More sharing options...
corbin Posted February 1, 2009 Share Posted February 1, 2009 What rewrite rule did it give you? Quote Link to comment https://forums.phpfreaks.com/topic/143150-solved-need-help-rewriting-indexcompage2-to-indexphpcurrentpage2/#findComment-751798 Share on other sites More sharing options...
limitphp Posted February 2, 2009 Author Share Posted February 2, 2009 sorry for the long delay..... it works now with this rule: RewriteRule ^page([a-zA-Z0-9]*)/?$ index.php?currentpage=$1 [NC,L] Quote Link to comment https://forums.phpfreaks.com/topic/143150-solved-need-help-rewriting-indexcompage2-to-indexphpcurrentpage2/#findComment-752539 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.