can someone help me with the last line? RewriteEngine on RewriteRule ^([0-9]+).php$ index.php?c=$1& [L] RewriteRule ^([0-9]+)add.php$ add_url.php?c=$1& [L] RewriteRule *******.php$ index.php?c=$1&s=$2 [L] what is instead of ***** ? Thanks.
Okay try RewriteRule ^([A-Za-z0-9]+)-([A-Za-z0-9]+).php$ index.php?c=$1&s=$2 [L] Code (markup): This is assumming $1 and $2 can only be alpha numeric without any symbols
I'm pretty new to mod_rewrite (started Monday) but with that wouldn't the . in the brackets match the hyphen between the brackets, if you know what I mean Your welcome, like I said I'm new to mod rewrite so still enjoy the practice, I'll get bored of it soon enough
Tip: Change php to html. Search engines like that more! (.*) and (.*) means $1 and $2 what ever is at $1 in the normal URL will be at the first (.*).
No, that will mean that the - is not in the match, and it must be (the regular expression always attempt to match the whole expression) consider "foo-bar" (.*) will match all ($1="foo-bar") (.*)bar will match $1="foo-", with "bar" at end, not part of $1 similarly (.*)-(.*) will match $1=foo, $2=bar