homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

seo friendly url issue using htaccess

Msg#: 4684218 posted 7:38 pm on Jul 1, 2014 (gmt 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
`http://localhost/mybb/login/register` 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.



WebmasterWorld Senior Member 10+ Year Member

Msg#: 4684218 posted 10:41 am on Jul 17, 2014 (gmt 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 /)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved