AdRock Posted September 4, 2006 Share Posted September 4, 2006 Can you rewrite a rule so you get something like[url=http://www.mysite.com/somepage/1]www.mysite.com/somepage/1[/url]from this[url=http://www.mysite.com/index.php?page=something_1]www.mysite.com/index.php?page=something_1[/url]I have about four pages named something_1, something_2 etc and don't know if i need a rewrite rule for each pageI was thinking of something like[code]RewriteRule ^somepage/([0-9]+)/?$ index.php?page=something_$1[/code]but i don't know if this is right Quote Link to comment Share on other sites More sharing options...
oldmanice Posted September 4, 2006 Share Posted September 4, 2006 I think the reason you are getting ? and = is because you have either left gaps in your files or you need to make a vhost. If you have no gaps in your files that could fix the url. Quote Link to comment Share on other sites More sharing options...
AdRock Posted September 4, 2006 Author Share Posted September 4, 2006 This is my current .htaccess file[code]Options +FollowSymLinksRewriteEngine onRewriteBase /RewriteRule ^([A-Za-z0-9\-_]+)/?$ index.php?page=$1RewriteRule ^gallery/([A-Za-z0-9\-_]+)/([0-9]+)/?$ index.php?page=$1&id=$2RewriteRule ^([A-Za-z0-9]+)/([0-9\-_]+)/?$ index.php?page=$1&pagenum=$2RewriteRule ^admin/([A-Za-z0-9\-_]+)/?$ admin/index.php?page=$1 [L] [/code]which works fine. I can change index.php?page= to just the pagename Quote Link to comment Share on other sites More sharing options...
oldmanice Posted September 4, 2006 Share Posted September 4, 2006 Um sorry I have know idea 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.