Stop a html file in sub folder from redirecting
-
Hi, I have a project page on my wordpress site like this,
xxx.com/projects/project1. On my server i have a subfolder calledlivewhich contains a html file also namedproject1.htmlso that file’s link isxxx.com/live/project1.html, which is what I need as people go to this link directly.
I’m trying to use htaccess to hide the.htmlfrom theproject1.htmldirect link, but doing so causes wordpress to redirect this linkxxx.com/live/project1.htmlback to the project’s page link herexxx.com/projects/project1.
I’ve tried the following two htaccess tricks with no luck. it removes the.htmlbut then still wordpress throws me back to the project page.RewriteRule ^(.+).html$ /$1 [R=301,L]RewriteRule ^live/(.+).html$ /live/$1 [R=301,L]
The topic ‘Stop a html file in sub folder from redirecting’ is closed to new replies.