Đang Thực Hiện

164799 htaccess and mod_rewrite help

A simple task for those with knowledge of htaccess and mod_rewrite...

My current htaccess file has a virtualhost is setup like this:

<VirtualHost xx.xxx.xxx.xxx>

ServerName [url removed, login to view]

DocumentRoot /home/mysite

<directory "/home/mysite">

RewriteEngine On

##Image Rule

RewriteRule images_folder/(.+\..{3,4})$ /[url removed, login to view]$1

##Page Rule

RewriteRule ^([a-zA-Z0-9\\-]{1,255})?\/?([a-zA-Z0-9\\-]{1,255})?\/?([a-zA-Z0-9\\-]{1,255})?\/?$ /[url removed, login to view]



At the moment all requests to that virtual host get routed to [url removed, login to view] unless it's a request for an image file in which case it gets handles as per the above image rule.

I need the code modified so that it makes an exception for requests for sitemap.xml. I want these requests routed to a [url removed, login to view] file.

e.g. a request for [url removed, login to view] file will direct any visitor to the [url removed, login to view] file in the directory.

Kĩ năng: Bất kì công việc gì, Thiết lập Bản thảo, Quản trị hệ thống

Xem nhiều hơn: 16 handles, htaccess, xml help, rewrite rule, htaccess mod_rewrite, php rewriteengine, documentroot, htaccess rewriteengine, php htaccess rewriteengine, rewriteengine, task help, php htaccess, htaccess rule, virtual host, sitemap php script, php htaccess help, rewriterule htaccess, xml htaccess rule, simple php sitemap, php script sitemap

Về Bên Thuê:
( 8 nhận xét )

ID dự án: #1910990