0

I have this .htaccess file

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

What I want is if someone accesses the URL example.com/feed/sejururi.xml to show him the content of example.com/feed.

However now the website shows a 404 not found error on example.com/feed/sejururi.xml.

1 Answer 1

0

First I would take it out from the Wordpress block rules, as it will be overwrited when permalinks are refreshed if you don't add the rule to Rewrite API.

Then you could add at the bottom of your htaccess something like:

Redirect 301 feed/sejururi.xml http://yoursite.com/feed/ 
5
  • gives still a 404
    – Mike
    Commented Nov 28, 2013 at 12:40
  • i would not go on a "redirect" but on a "rewrite" ... i need the url to stay the same while the user sees the same as on the orher link
    – Mike
    Commented Nov 28, 2013 at 12:41
  • If you try yoursite.com/feed that url actually works?
    – chifliiiii
    Commented Nov 28, 2013 at 15:30
  • What you are getting by directly accessing url yoursite.com/feed ?
    – Manish
    Commented Nov 28, 2013 at 18:10
  • I am getting the correct feed and it loads correctly.
    – Mike
    Commented Nov 29, 2013 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.