Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

seo friendly url issue using htaccess

7:38 pm on Jul 1, 2014 (gmt 0)

New User

5+ Year Member

joined:Dec 2, 2012
posts: 4
votes: 0

I am having a problem with htaccess.

My non seo friendly url looks like this


and the code is

Options -MultiViews
RewriteEngine On
RewriteBase /mybb/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

And it returns
which is absolutely fine now I am trying to modify the url which will look like this


And the original url is


I tried with this

 RewriteRule ^(.+)$ index.php?url=$1&step=1$ [QSA,L]

it worked with the url which has step as param but if there is no 'step' in url then it doesn't work.Is it possible to add the /step/1 in the seo url only if the actual url contains the param called 'step'.Thanks.
10:41 am on July 17, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Oct 15, 2004
votes: 0

RewriteRule ^([^/]+)/step/([^/]+)/$ index.php?url=$1&step=$2 [NC,L]

This rule is close to what you look for BUT your two variables must have no / in them.
I cant offer more help, with the way your variables arr set (i mean with url='login/register', containing already a /)