skip to Main Content

301 Redirect in htaccess for URLs having Parameter P – Apache

I need to set 301 redirect in htaccess for URLs having parameter P. One example URL is http://www.price4india.co.in/vivo-x20-plus-ud-price-in-india-scanner-feature-real.html?p=1028 to http://www.price4india.co.in/vivo-x20-plus-ud-price-in-india-scanner-feature-real.html After redirect everything after .html shall get removed and the value after P=...... can be any numerical value. So far…

VIEW QUESTION

.htaccess Rewrite: how to ignore sub pages – WordPress

I have WordPress pages like https://example.com/mainpage https://example.com/mainpage/sub-page1 https://example.com/mainpage/sub-page2 https://example.com/mainpage/sub-page3 I have written a RewriteRule just for mainpage RewriteRule ^mainpage$ mainpage.php [L,QSA] also tried RewriteCond %{REQUEST_URI} !^/mainpage/sub-page1 RewriteRule ^mainpage$ mainpage.php [L,QSA] and RewriteCond %{REQUEST_URI} !^/mainpage/.*$ RewriteRule ^mainpage$ mainpage.php [L,QSA] but all…

VIEW QUESTION

.htaccess rewriteCond part of the url – Apache

URL applying rule(s): https://olddomain.ch/de/qahmkitd73/ https://olddomain.ch/fr/qahmkitd73/ https://olddomain.ch/en/qahmkitd73/ RewriteCond %{HTTP_HOST} chezcamillebloch.ch$ RewriteCond %{REQUEST_URI} ^/.*/qahmkitd73/$ [NC] RewriteRule .* https://newdomain.ch/$1/qahmkitd73 [NE,R=301,L] this should redirect to https://newdomain.ch/**/qahmkitd73 the ** should be dynamic from the URL (de/ or en/ or fr/)

VIEW QUESTION

php nginx rewrite urls to index.php with

I've been trying to get this to work for a while now, but I'm failing manifold. I have the following configuration: server { listen 8081; server_name name.of.server.en; root /path/to/api; index index.php; location ~ .php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; }…

VIEW QUESTION
Back To Top
Search