Mobile app version of vmapp.org
Login or Join
Reiling115

: How Do I Remove A Subfolder Using Htaccess? I am trying to remove /view from example.com/businesses/view so you can go to example.com/businesses and it works correctly. Here's what's in my htaccess

@Reiling115

Posted in: #Htaccess

I am trying to remove /view from example.com/businesses/view so you can go to example.com/businesses and it works correctly. Here's what's in my htaccess already:

DirectoryIndex index.php
RewriteBase /
RewriteEngine on
RewriteCond !^(index.php|images|css|js|robots.txt|favicon.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/ [L]


I plan to do this to multiple directories, so how would I go about that?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sherry384

In example.com/businesses/.htaccess

write the following:

RewriteEngine on

RewriteRule ^view$ example.com/businesses [R=301]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme