Remove folder from url
6 posts
• Page 1 of 1
- primowebmedia
- Posts: 3
- Joined: 03 Dec 2012, 20:58
Remove folder from url
Hi
I need to remove a folder from every dynamically created url, for example:
http://forum.mydomain.com/forum/forum_p ... 706#216706
needs to redirect to
http://forum.mydomain.com/forum_posts.a ... 706#216706
Can anybody help?
I need to remove a folder from every dynamically created url, for example:
http://forum.mydomain.com/forum/forum_p ... 706#216706
needs to redirect to
http://forum.mydomain.com/forum_posts.a ... 706#216706
Can anybody help?
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Remove folder from url
Hello,
try to use the following:
Regards
Andrew
try to use the following:
- Code: Select all
RewriteEngine on
RewriteBase /
RewriteRule ^forum/forum_posts\.asp$ /forum_posts.asp [NC,QSA,R=301,L]
RewriteRule ^forum_posts\.asp$ /forum/forum_posts.asp [NC,QSA,L]
Regards
Andrew
- primowebmedia
- Posts: 3
- Joined: 03 Dec 2012, 20:58
Re: Remove folder from url
I tried that Andrew but I just get a 404 page error.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Remove folder from url
Ok, do you get 301 redirect?
regards
Andrew
regards
Andrew
- primowebmedia
- Posts: 3
- Joined: 03 Dec 2012, 20:58
Re: Remove folder from url
Yes it redirects the url correctly but it says 'The page cannot be found', and the #216706 is removed from the url.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Remove folder from url
Oh, the '#' will not work. It's something your browser processes and performs, not the server, so server will simply drop it after redirect. This could be the problem.
Please, provide rewrite.log for the testing request. Logging issues described in FAQ
Regards
Andrew
Please, provide rewrite.log for the testing request. Logging issues described in FAQ
Regards
Andrew
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 31 guests