.htaccess? How to modify code?

Alles, was den Apache betrifft, kann hier besprochen werden.

.htaccess? How to modify code?

Postby vish » 23. April 2011 14:03

Hi,

I am using a open source script which works well in my xampp root directory but when i put it in sub-root directory it does not work.
For instance when i hit localhost in browser the webpage appears but if i put it in sub folder called "deals" and then try localhost/deals in browser it does not work.What do you think is the problem?

Here is the .htaccess code :

Code: Select all
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^([^/]+).html /index.php?file=$1 [NC]
RewriteRule ^([^/]+)/([^/]+).html /index.php?file=$1&sub1=$2 [NC]
RewriteRule ^([^/]+)/category/([^/]+).html /index.php?file=$1&sub1=category [NC]
RewriteRule ^ndeals-login /deals-admin.php?file=$1 [NC]
RewriteRule ^admin/profile /deals-admin.php?file=profile [NC]
RewriteRule ^admin/reg/([^/]+) /deals-admin.php?file=$1 [NC]
RewriteRule ^admin/logout /site-admin/pages/logout.php [NC]
RewriteRule ^admin/edit/([^/]+)/([^/]+) /deals-admin.php?file=edit [NC]
RewriteRule ^admin/view/rep/([^/]+) /deals-admin.php?file=$1 [NC]
RewriteRule ^admin/changepassword /deals-admin.php?file=changepassword [NC]
RewriteRule ^admin/couponsupload /deals-admin.php?file=couponsupload [NC]
RewriteRule ^coupon/code/(.*) /site-admin/pages/generate_coupon_id.php [NC]
RewriteRule ^edit/coupon/(.*) /deals-admin.php?file=editcoupon&sub1=$1 [NC]
RewriteRule ^add/shop/ /deals-admin.php?file=addshop [NC]
RewriteRule ^edit/shop/(.*) /deals-admin.php?file=editshop&sub1=$1 [NC]
RewriteRule ^admin/viewclosedcoupon/(.*) /deals-admin.php?file=viewclosedcoupon&sub1=$1 [NC]
RewriteRule ^admin/sitemap /deals-admin.php?file=sitemap [NC]
RewriteRule ^admin/rss /deals-admin.php?file=rss [NC]
RewriteRule ^add/country/ /deals-admin.php?file=addcountry [NC]
RewriteRule ^edit/country/(.*) /deals-admin.php?file=editcountry&sub1=$1 [NC]
RewriteRule ^add/city/ /deals-admin.php?file=addcity [NC]
RewriteRule ^edit/city/(.*) /deals-admin.php?file=editcity&sub1=$1 [NC]
RewriteRule ^add/category/ /deals-admin.php?file=addcategory [NC]
RewriteRule ^edit/category/(.*) /deals-admin.php?file=editcategory&sub1=$1 [NC]
RewriteRule ^manage/(.*) /deals-admin.php?file=manage&sub1=$1 [NC]
RewriteRule ^admin/emailall /deals-admin.php?file=emaillall [NC]
RewriteRule ^admin/paymentlist /deals-admin.php?file=paymentlist [NC]
RewriteRule ^admin/general /deals-admin.php?file=general [NC]
RewriteRule ^admin/newsletter /deals-admin.php?file=newsletter [NC]


What should i modify to make it run in sub-root also?
Any help would be appreatiated.

Thank You.
vish
 
Posts: 1
Joined: 23. April 2011 13:49

Re: .htaccess? How to modify code?

Postby Nobbie » 23. April 2011 15:02

Ich denke nicht, dass Du unterhalb des Open Source CMS (welches?) in einem eigenen Unterordner Scripts laufen lassen kannst. Das geht einfach nicht, dafür ist das CMS nicht designed.

Stattdessen solltest Du das CMS selbst in einem eigenen Unterordner installieren und eigene Scripts in einem Parallelordner installieren, damit diese .htaccess NICHT im Hauptordner liegt.
Nobbie
 
Posts: 8769
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 5 guests