shanejeffery86 Posted October 2, 2010 Share Posted October 2, 2010 I have been doing mod_rewrite for a bit now and heck if I can figure out what is going wrong. I am just trying to rewrite 3 VERY basic URLs. http://www.khaccounts.net/index.php -- to -- http://www.khaccounts.net/buy-wow-account/ http://www.khaccounts.net/sell.php -- to -- http://www.khaccounts.net/sell-wow-account/ http://www.khaccounts.net/about.php -- to -- http://www.khaccounts.net/about-khaccountsnet/ I was under the impression that the following would work: RewriteEngine On RewriteRule /buy-wow-account/ /index.php [L] RewriteRule /sell-wow-account/ /sell.php [L] RewriteRule /about-khaccountsnet/ /about.php [L] What am I doing wrong? The mod_rewrite module is enabled at the server level. Thanks! Link to comment https://forums.phpfreaks.com/topic/215008-basic-rewrite-issues/ Share on other sites More sharing options...
cags Posted October 3, 2010 Share Posted October 3, 2010 Where are you placing the directives? Assuming it's in a .htaccess file then you probably want to lose the forward slash at the start of the pattern. RewriteEngine On RewriteRule ^buy-wow-account/?$ /index.php [L] RewriteRule ^sell-wow-account/?$ /sell.php [L] RewriteRule ^about-khaccountsnet/?$ /about.php [L] Link to comment https://forums.phpfreaks.com/topic/215008-basic-rewrite-issues/#findComment-1118511 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.