Jump to content

another mod rewrite q.


poe

Recommended Posts

 

how would i write this if i want to accept any alpha [a-zA-Z] and or either :

 

single underscore '_' or singleunderscore ampsign underscore '_&_'

 

i dont think [a-zA-Z_(&_)] is correct.

 

RewriteRule (.*)mod_category/[a-zA-Z_(&_)]/?$ mod_category.php [L]

 

so a url that is:

 

mod_category/catname/ = ok

mod_category/cat_name/ = ok

mod_category/cat_&_name/ = ok

 

but

mod_category/cat__name/ = not ok (multiple _)

mod_category/cat_#_name/ = not ok (# invalid character)

etc...

 

 

Link to comment
https://forums.phpfreaks.com/topic/81141-another-mod-rewrite-q/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.