logo
down
shadow

Remove specific slug in with htaccess


Remove specific slug in with htaccess

By : user2952241
Date : November 19 2020, 12:41 AM
wish helps you Before answering, a better idea than using htaccess for this is to use Wordpress' rewrite modules.
Anyway, you need to put your specific rules before Wordpress' main rule.
code :
# BEGIN WordPress 
<IfModule mod_rewrite.c> 
  Options +FollowSymLinks -MultiViews

  RewriteEngine On 
  RewriteBase /subdirectory/ 

  # redirect /.../tags/XXX to /.../XXX
  RewriteCond %{THE_REQUEST} /images\.html/nggallery/tags/([^\s\?]+)\s [NC]
  RewriteRule ^ images/nggallery/%1? [R=301,L]

  # internally rewrite /.../XXX to /.../tags/XXX
  RewriteRule ^images/nggallery/(.+)$ images.html/nggallery/tags/$1 [L]

  RewriteRule ^index\.php$ - [L] 
  RewriteCond %{REQUEST_FILENAME} !-f 
  RewriteCond %{REQUEST_FILENAME} !-d 
  RewriteRule ^ index.php [L]
</IfModule>
# END WordPress


Share : facebook icon twitter icon
htaccess redirect remove category slug from url

htaccess redirect remove category slug from url


By : androido
Date : March 29 2020, 07:55 AM
hope this fix your issue Using .htaccess file in apache server, how can I get , Try:
code :
RedirectMatch 301 ^/[^/]+/([^/]+)/?$ /$1
htaccess rewrite specific slug to specific page

htaccess rewrite specific slug to specific page


By : Dhaval Poladia
Date : March 29 2020, 07:55 AM
To fix the issue you can do What you want is a internal redirect however on your rule you have R=301 remove that and leave only [L]
You may also want to add to your keyhole.php rule the following conditions:
code :
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
WordPress change or remove custom post slug from url using htaccess

WordPress change or remove custom post slug from url using htaccess


By : Karan
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further i managed this using https://wordpress.org/plugins/custom-permalinks/ this allows me to change any permlinks
HTACCESS Remove Slug Not Working

HTACCESS Remove Slug Not Working


By : facebook-85007834841
Date : March 29 2020, 07:55 AM
it should still fix some issue Change the order of the lines. /index should be the last, the special patterns should be caught before:
code :
RewriteRule ^dizi/(.*)$ /$1 [L,NC,R]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Ruby on Rails - Remove slug uniqueness from Friendly_id slug in database

Ruby on Rails - Remove slug uniqueness from Friendly_id slug in database


By : filip
Date : March 29 2020, 07:55 AM
it fixes the issue if you want to do it in a rails migration, you should be able to remove the index and then add it back without the unique constraint.
Something similar to this should do the trick
code :
class ChangeSlugIndex < ActiveRecord::Migration
  def change
    remove_index(:slides, name: 'index_slides_on_slug_and_post_id')
    add_index(:slides, [:slug,:post_id], name: 'index_slides_on_slug_and_post_id')
  end
end
Related Posts Related Posts :
  • https with url rewriting
  • Trying to get Websockify/noVNC to work through a reverse proxy
  • .htaccess rewrite parameters not passing to target page
  • my htaccess does not affect the url
  • Trying to apply mod rewrite rule for e.g. css/style.123456.css -> css/style.min.css
  • Joomla 301 redirect in .htaccess returns 404 error
  • Pass ID to another URL
  • apache2 external disk permissions
  • apache mod_rewrite user URLs to index.php
  • Redirect from subfolder to main domain with different port
  • Which ErrorDocument request will take precedence?
  • How make apache redirect the user to some page when the requested page is not existing
  • warn NameVirtualHost *:443 has no VirtualHosts
  • Relatively where does solr.data.dir in solrconfig.xml points to?
  • Redirecting HTTP to HTTPS correctly in Question2Answer script
  • Why are these mod_rewrite rules not working?
  • htaccess mod_rewrite: Simplifying URL
  • .htaccess Adding a trailing slash to requested files
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org