Reputation: 3024
How can I rewrite
website.com/feed/file.xml
to
website.com/feed
using htaccess?
I need the user to access first line and show him the content from 2'nd line.
Edit 1: posted current .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^feed?$ feed/sejururi.xml [NC,L]
</IfModule>
Upvotes: 1
Views: 114
Reputation: 785256
I need the user to access first line and show him the content from 2'nd line.
This rule should for you in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteRule ^(feed)/sejururi\.xml$ /$1 [NC,L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(feed)/sejururi\.xml$ $1 [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Upvotes: 1