Danny620 Posted May 14, 2012 Share Posted May 14, 2012 I want a url like http://www.mywebsite.co.uk/jobfinder I've got this to work http://www.mywebsite.co.uk/jobfinder/ using <IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([^\.]+)/$ $1.php [NC,L] </IfModule> Link to comment https://forums.phpfreaks.com/topic/262499-mod-rewrite/ Share on other sites More sharing options...
requinix Posted May 14, 2012 Share Posted May 14, 2012 Hint: a ? means the thing before it is optional. Link to comment https://forums.phpfreaks.com/topic/262499-mod-rewrite/#findComment-1345276 Share on other sites More sharing options...
Danny620 Posted May 14, 2012 Author Share Posted May 14, 2012 please code you show me an example Link to comment https://forums.phpfreaks.com/topic/262499-mod-rewrite/#findComment-1345299 Share on other sites More sharing options...
requinix Posted May 14, 2012 Share Posted May 14, 2012 Of how a question mark works? Sure. abc -- matches only "abc" abc? -- matches "ab" optionally followed by a "c" Link to comment https://forums.phpfreaks.com/topic/262499-mod-rewrite/#findComment-1345477 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.