• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTACCESS HELP!!! PLEASE ...

#1
[eluser]Gewa[/eluser]
Hi . I am finishing a guide website for austria.. Austria 4 Fun So I need to upload XML files of sitemap. There should be more than 400.000links . So there is more than 25XML files wih links. I need to allow ALL XML and XML.GZ files to be accessble from htaccess.


how to make it without writing each name in the line like it is now . Here Htaccess which I wanted to use. but it gives Server 500Error.. Maybe too big????
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|tinymce|config|forum|uploads|js|img|css|tmp|public|user_guide|robots\.txt|sitemap\.xml|sitemap\.xml.gz
|sitemap_firms1\.xml|sitemap_firms1.xml\.gz|sitemap_firms2\.xml|sitemap_firms2.xml\.gz|sitemap_firms3\.xml|sitemap_firms3.xml\.gz|sitemap_firms4\.xml|sitemap_firms4.xml\.gz|sitemap_firms5\.xml|sitemap_firms5.xml\.gz|sitemap_firms6\.xml|sitemap_firms6.xml\.gz|sitemap_firms7\.xml|sitemap_firms7.xml\.gz|sitemap_firms8\.xml|sitemap_firms8.xml\.gz|sitemap_firms9\.xml|sitemap_firms9.xml\.gz|sitemap_firms10\.xml|sitemap_firms10.xml\.gz|sitemap_firms11\.xml|sitemap_firms11.xml\.gz|sitemap_firms12\.xml|sitemap_firms12.xml\.gz|sitemap_firms13\.xml|sitemap_firms13.xml\.gz|sitemap_firms14\.xml|sitemap_firms14.xml\.gz|sitemap_firms15\.xml|sitemap_firms15.xml\.gz|sitemap_firms16\.xml|sitemap_firms16.xml\.gz|sitemap_firms17\.xml|sitemap_firms17.xml\.gz
|sitemap_firms18\.xml|sitemap_firms18.xml\.gz|sitemap_firms19\.xml|sitemap_firms19.xml\.gz|sitemap_firms20\.xml|sitemap_firms20.xml\.gz|sitemap_firms21\.xml|sitemap_firms21.xml\.gz)
RewriteRule ^(.*)$ /index.php/$1 [L]

#2
[eluser]ChangedNames[/eluser]
If I understand you correctly you don't want index.php to process any of the xml or xml.gz files. If that is the case you might try something like this:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|tinymce|config|forum|uploads|js|img|css|tmp|public|user_guide|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [L]

This is adding in 2 conditions saying "If the file requested IS NOT actually a file then process index.php"

So if you have .xml files (or .xml.gz files) on your server the .htaccess file shouldn't be routing it to index.php.

#3
[eluser]gon[/eluser]
This should serve any sitemap.xml or gz:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|tinymce|config|forum|uploads|js|img|css|tmp|public|user_guide|robots\.txt|sitemap\.)
RewriteRule ^(.*)$ /index.php/$1 [L]

#4
[eluser]Gewa[/eluser]
will this serve also files like sitemap_firms1.xml, sitemap_firms2.xml... or?

#5
[eluser]gon[/eluser]
Nope.

You can try:

RewriteCond $1 !^(index\.php|images|tinymce|config|forum|uploads|js|img|css|tmp|public|user_guide|robots\.txt|sitemap)

To serve any file or dir starting with sitemap

#6
[eluser]Gewa[/eluser]
Thank you gon! THAAAAAAAAAAAAAANK YOU!!! this realy helped me... best regards


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.