skip to Main Content

How to redirect almost similar links? – Apache

I need to write two redirects: From https://site.ru/dveri to https://anothersite.ru/dveri-iz-dereva/ From https://site.ru/dveri?start=14 to https://anothersite.ru/blog/ I wrote two rules in htaccess: #1 RewriteCond %{THE_REQUEST} s/+dveri[?s/] [NC] RewriteRule ^ https://anothersite.ru/dveri-iz-dereva/ [L,R=301] #2 RewriteCond %{THE_REQUEST} s/+dveri[?s/] [NC] RewriteRule ^.*$ https://anothersite.ru/blog/? [L,R=301] Result: link…

VIEW QUESTION

Apache rewrite with and without Parameters

I need to rewrite URL's with and without parameters in the URL, I configured a RewriteMap via dbm kronen-und-gehaeusetuben/wasserdicht-typ-pbbz.html => Produkte/Werke-Uhrenersatzteile/Schraubkronen-PBBZ-wasserdicht/ kronen-und-gehaeusetuben/wasserdicht-typ-pbbz.html?___store=default => Produkte/Werke-Uhrenersatzteile/Schraubkronen-PBBZ-wasserdicht/ kronen-und-gehaeusetuben/wasserdicht-typ-pbbz.html?___store=en => en/Products/Watch-replacement-parts/Watch-crowns/Screw-on-crowns/Screw-on-crowns-PBBZ-waterproof/ kronen-und-gehaeusetuben/wasserdicht-typ-pbbz.html?___store=fr => fr/Produits/Couronnes/Couronnes-vissees/Couronnes-vissees-PBBZ-etanches/ kronen-und-gehaeusetuben/wasserdicht-typ-pbbz.html?___store=es => es/Productos/Movimientos-Piezas/Piezas-de-repuesto-para-relojes/Coronas/Coronas-a-rosca/Coronas-a-rosca-PBBZ-hermeticas/ <VirtualHost *:80> DocumentRoot "/var/www/html" #ServerName www.example.com RewriteMap…

VIEW QUESTION

Replace substring in URL via RewriteEngine – Apache

im desperately trying to make RewriteEngine to rewrite the following pattern: https://example.com/api/model/id/ https://example.com/staging/api/model/id/ internally to https://example.com/index.php/model/id/ https://example.com/staging/index.php/model/id/ I already tried several suggestions from several boards but none of them worked out for me. Ideally the rule should just search for…

VIEW QUESTION

how to get PHP Smart URL – Apache

My website has URL like this domain.com/profile.php?id=your_profile_id now how do i turn it into URL like this domain.com/profile/your_profile_id I tried this thing in .htaccess RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule !.*.php$ %{REQUEST_FILENAME}.php [QSA,L] and it's just helps me to remove .php extension.…

VIEW QUESTION
Back To Top
Search