Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
improved code formatting; removed thanks;
Source Link
Eugene Manuilov
  • 11.4k
  • 4
  • 44
  • 50

I want to redirect the http://xyz.com/freebooks/ to http://xyz.com/shop/?min_price=0&max_price=0

I added this to the .htaccess and it redirects to the shop page but doesn't retain the /freebooks/ or filters like the original url.

.htaccees.htaccees:

RewriteEngine On
RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0  [NC,L]

BEGIN WordPress


# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule> 

# END WordPress

END WordPress

ResutingResulting URL: xyz.com/shop/
expectedxyz.com/shop/

Expected URL: xyz.com/freeabooksxyz.com/freeabooks (with the shop showing only freebooks)

I want to redirect the http://xyz.com/freebooks/ to http://xyz.com/shop/?min_price=0&max_price=0

I added this to the .htaccess and it redirects to the shop page but doesn't retain the /freebooks/ or filters like the original url.

.htaccees

RewriteEngine On
RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0  [NC,L]

BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

END WordPress

Resuting URL: xyz.com/shop/
expected: xyz.com/freeabooks (with the shop showing only freebooks)

I want to redirect the http://xyz.com/freebooks/ to http://xyz.com/shop/?min_price=0&max_price=0

I added this to the .htaccess and it redirects to the shop page but doesn't retain the /freebooks/ or filters like the original url.

.htaccees:

RewriteEngine On
RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0  [NC,L]

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule> 

# END WordPress

Resulting URL: xyz.com/shop/

Expected URL: xyz.com/freeabooks (with the shop showing only freebooks)

I want to redirect the http://xyz.com/freebooks/ to http://xyz.com/shop/?min_price=0&max_price=0

I added this to the .htaccess and it redirects to the shop page but doesn't retain the /freebooks/ or filters like the original url.

.htaccees RewriteEngine On RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0 [NC,L]

RewriteEngine On
RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0  [NC,L]

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RewriteRule . /index.php [L]

END WordPress

Resuting URL: xyz.com/shop/ 
expected: xyz.com/freeabooks (with the shop showing only freebooks)

Thanks for your help.

I want to redirect the http://xyz.com/freebooks/ to http://xyz.com/shop/?min_price=0&max_price=0

I added this to the .htaccess and it redirects to the shop page but doesn't retain the /freebooks/ or filters like the original url.

.htaccees RewriteEngine On RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0 [NC,L]

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

Resuting URL: xyz.com/shop/ expected: xyz.com/freeabooks (with the shop showing only freebooks)

Thanks for your help.

I want to redirect the http://xyz.com/freebooks/ to http://xyz.com/shop/?min_price=0&max_price=0

I added this to the .htaccess and it redirects to the shop page but doesn't retain the /freebooks/ or filters like the original url.

.htaccees

RewriteEngine On
RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0  [NC,L]

BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

END WordPress

Resuting URL: xyz.com/shop/ 
expected: xyz.com/freeabooks (with the shop showing only freebooks)

Source Link

Redirect not working

I want to redirect the http://xyz.com/freebooks/ to http://xyz.com/shop/?min_price=0&max_price=0

I added this to the .htaccess and it redirects to the shop page but doesn't retain the /freebooks/ or filters like the original url.

.htaccees RewriteEngine On RewriteRule ^freebooks$ index.php?p=5&min_price=0&max_price=0 [NC,L]

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

Resuting URL: xyz.com/shop/ expected: xyz.com/freeabooks (with the shop showing only freebooks)

Thanks for your help.