skip to Main Content

php dynamic parameters to url with htaccess – SEO

I'm trying to make SEO Friendly url by altering php parameters with slash based url. I want to make mysite.com/TopList.php?tl=ToplistName&fr=2021-02-10&to=2021-02-20 into: mysite.com/ToplistName/2021-02-20/2021-02-20 I had success with rewriting url but none of my includes are referring to right directory path and…

VIEW QUESTION

redirect loop with mod_rewrite – Apache

I'm trying to add a language prefix to my pages through mod_rewrite eg: https://example.com/ > https://example.com/en/ and internally it need to translate to `https://example.com/?language=en I've managed to do it for the base url, but when I try to do it…

VIEW QUESTION

htacess RewriteRule http://domain/folder/(any searchstring) to redirect to http://domain/folder/index.php?option=$1 – Apache

I am trying to create a rewrite rule in my Apache .htaccess file and the goal is: http://domain/folder/(any search string) to redirect to http://domain/folder/index.php?option=$1 example: http://domain/folder/covid to redirect to http://domain/folder/index.php?option=covid I got this setup in htacess in http://domain/folder, but somehow…

VIEW QUESTION

Forward one path to another AND convert spaces to hyphens along the way – Apache

Trying to change https://www.example.com/search/label/my%20search%20term to https://www.example.com/tag/my-search-term Per the answer from @anubhava below, Option 2 works: RewriteEngine On RewriteRule ^search/label/(S+)[-s]+(S+)$ /tag/$1-$2 [NE,NC,L,R=301] RewriteRule ^search/label/(S+)$ /tag/$1 [NE,NC,L,R=301] RewriteRule ^(search/label/S+)s+(S+s.*)$ /$1-$2 [NC,L] Thanks!

VIEW QUESTION

Renaming file in URL (.php file) – Apache

I have a file called filename-step1.php and looking to make the url domain.com/filename/step1 through .htaccess. My current .htaccess file looks like: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^.]+)$ $1.php [NC,L] At the moment, this works fine for removing the .php…

VIEW QUESTION

PHP friendly URL bug? – Apache

I just started a course of implementing MVC pattern using PHP and I think I'm experiencing a bug regarding friendly URL engine. The site I'm creating has the follow URL syntax: http://[site]/[controller]/[method]/[parameters] . Until now it works in a very…

VIEW QUESTION
Back To Top
Search