Jump to content

[SOLVED] clean url


ayok

Recommended Posts

Hi,

 

I'm trying to make a .htacces file for a cleaner urls with rewriterule. However, I've got a problem with a variable with two values.

 

For example:

RewriteRule ^page/([0-9_-]+)-([0-9_-]+)-([0-9_-]+).html$    	page/index.php?id=$1&menusOpen=$2&menuId=$3 [L]

 

With this codes I got page/0-12-34.html, but some values of "menusOpen" variable has two or three values like menusOpen=23-24-34 or menusOpen=1-21. So, I can't open those url.

 

I've tried

RewriteRule ^page/([0-9_-]+)-([0-9_-]+)-([0-9_-]+)-([0-9_-]+).html$    	page/index.php?id=$1&menusOpen=$2-$3&menuId=$4 [L]

but it doesn't work.

 

Would anyone help me with this?

 

Thank you,

ayok

Link to comment
https://forums.phpfreaks.com/topic/150399-solved-clean-url/
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.