Mobile app version of vmapp.org
Login or Join
LarsenBagley505

: Need a generic way to create SEO friendly URL I have searched a lot and implemented many many Regular Expression in my .htaccess file but can not succeed. How do I find a generic way that

@LarsenBagley505

Posted in: #Htaccess #Localhost #ModRewrite #Seo #UrlShorteners

I have searched a lot and implemented many many Regular Expression in my .htaccess file but can not succeed. How do I find a generic way that make my URL SEO friendly?

Currently this is in my .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page= [L,QSA]


What I need to do is that I have a URL like this:

localhost/abc/index.php?page=boats_for_sale

I need to change it to

localhost/abc/boats_for_sale

Similarly, I want to hide all query strings in my URL. How would I achieve it?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @LarsenBagley505

1 Comments

Sorted by latest first Latest Oldest Best

 

@BetL925

RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=
RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=


for detail follow this link

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme