I am trying to convert a simple URL (below) to a blog-style URL, but am not quite sure how to do this, all my other rules work fine, but I can't seem to be one of these.
URL I want to convert: http://www.website.com/myblog.php?id=1&title=My+blog+title
URL I want it to create: http://www.website.com/1/my-blog-title
What should be the rule?
Any help was appreciated :)
try it
RewriteEngine on RewriteBase / RewriteRule ([0-9]+)/([^.]+) myblog.php?id=$1&title=$2
Try this in your .htaccess file:
RewriteEngine on RewriteRule ^(\d+)/([^/]+)$ myblog.php?id=$1&title=$2
But here hyphens are not replaced by plus signs.
.htaccess,
RewriteEngine On RewriteRule ^([^/]*)/([^/]*)$ /myblog.php?id=$1 [L]
( ) , . , .
Source: https://habr.com/ru/post/1745303/More articles:How to scroll the entire visible page to an anchor with a smooth effect (Scriptaculous or jQuery)? - javascriptWhat is the difference in syntax between Symbian C ++ and canonical C ++? - c ++Parse livescores from website - phpSO_LINGER and closing sockets (WINSOCK) - chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1745302/sql-2005-merge-concatenate-multiple-rows-to-one-column&usg=ALkJrhjsdGER2hmO6iMOEplZwSTUZP6vDAhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1745304/problem-configure-jboss-to-work-with-jndi&usg=ALkJrhgss5mOPRCEWc3cRG6vG5idYMHvewhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1745305/problem-configure-jboss-to-work-with-jndi2&usg=ALkJrhgorr3ON19HW0Tvvne0O7lWBIlmggHow does Concat () actually join collections at a lower level? - collectionsFind workspace location with ANT - eclipseКак использовать skype в рубине (любой камень?) - rubyAll Articles