skip to Main Content

adding forward slash after rewrite if not exist – Apache

I have read a ton and tried a ton of solutions, but can't find one specific to my needs. In my htaccess I have the following: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^profile/([w-]+)/?$ profile.php?username=$1 [L,QSA] RewriteRule ^profile/([w-]+)/([w-]+)/?$ profile.php?username=$1&type=$2 [L,QSA]…

VIEW QUESTION

Rewrite url for seo friendly htaccess

I want to rewrite this in SEO friendly url. From - www.example.com/section.php?name=website To - www.example.com/section/website I tried this: RewriteEngine On RewriteRule ([^/.]+)/([^/.]+)?$ section.php?type=$1&service=$2 [NC,L] I am fetching data using GET method in section.php and pass to the another page but…

VIEW QUESTION

How to convert htaccess to nginx

I have problems to convert a htaccess file to nginx. Maybe someone can help me. I need the following code converted: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] I tried…

VIEW QUESTION
Back To Top
Search