replace all symbols and white spaces with dash using htaccess rewrite

358
February 20, 2017, at 5:06 PM

I want to rewrite the URL by replacing spaces and other symbols with dash and removing apostrophe. I am unable to do it. Here is my .htaccess.

RewriteEngine On
RewriteRule ^videos/([0-9]+)/([a-z\-A-Z]+) post.php?p_id=$1&title=$2 [L]

Example

Result: example.com/videos/1/why's%20%sis%sare

Expected: example.com/videos/1/whys-20-is-are

Rent Charter Buses Company
READ ALSO
Data cannot be retrieved from $_SESSION in PHP

Data cannot be retrieved from $_SESSION in PHP

Hello i am a beginner in the PHP LanguageI am finding it difficult to fetch / display data from a session in PHP

351
Parsing JSON and Make New Object With PHP

Parsing JSON and Make New Object With PHP

How Can I Take id From survey_answer json and Inset That in id2 Column?, with php and mysql

374
Email Receiving issue from Godaddy server?

Email Receiving issue from Godaddy server?

I am using Godaddy Workspace emailThe problem is I can send emails to other emails like Gmail yahoo etc but cannot receive emails from my domain based email and other emails

273
How to count based on where in mysql? php

How to count based on where in mysql? php

I was wondering how can I make a query that will show the counts that I need using codeigniter?

288