: Remove folder name from rewritten URLs Consider this URL: http://example.com/gallery/20141111-some-title In this URL I want to hide gallery/: http://example.com/20141111-some-title How can I achieve
Consider this URL:
example.com/gallery/20141111-some-title
In this URL I want to hide gallery/:
example.com/20141111-some-title
How can I achieve this using mod_rewrite?
I used online generators for doing the rewrite rules but none can remove a piece of text from the URL.
More posts by @Chiappetta492
2 Comments
Sorted by latest first Latest Oldest Best
Try
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /gallery/ [L]
</IfModule>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.