Today's Messages (off)  | Unanswered Messages (on)

Forum: General chat
 Topic: who could that be?
who could that be? [message #2460] Mon, 30 May 2011 14:25
2011dk
Messages: 1
Registered: May 2011
In my access log I get this visitor "accessed by .." from time to time, can anybody here tell me what that is.

Thanks!
 Topic: how to detect a text in url
how to detect a text in url [message #2107] Wed, 16 February 2011 13:41
subhashranjan  is currently offline subhashranjan
Messages: 1
Registered: February 2011
Location: delhi
Hi,

I have two types of urls

(1)www.example.com/something-is-here/.../something.html

and


(2)www.example.com/men/something-is-here/.../something.html

also

www.example.com/women/something-is-here/.../something.html




i want if any one type first type url without men or women, to be redirected to second type of urls.


i mean i want to add men or women.


can any one help me?

thanks

[Updated on: Wed, 16 February 2011 13:42]

Forum: Htaccess Questions
 Topic: htaccess 404 with IE
htaccess 404 with IE [message #5084] Fri, 16 March 2012 19:17
bigdogcattle  is currently offline bigdogcattle
Messages: 2
Registered: September 2010
I am trying to get my .htaccess file to work with IE. It seems to work for with FF. Here is what I have:

ErrorDocument 404 /404.html

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] 
</IfModule>

[Updated on: Fri, 16 March 2012 19:52]

 Topic: Rewrite unintentionally changes image URLs
Rewrite unintentionally changes image URLs [message #4918] Tue, 04 October 2011 11:56
accessoire  is currently offline accessoire
Messages: 1
Registered: September 2011
I have the following .htaccess:

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{HTTP_HOST} "!m.domain.de" [NC]
RewriteRule (.*) http://m.domain.de/ [L]


So when a mobile device types in domain.de it gets redirected to m.domain.de which is the URL for our mobile website. The problem is, that I have some blog entries embedded via PHP, that are on the normal domain.de/blog/ directory. Those have some images included. But the htaccess rewrites this to m.domain.de/blog/ which of course doesn't work, because the URLs for the images are in the not-rewritten URL.. Is there a way to prevent the writing for EVERYTHING on the website? I just want the urls in the browser bar to be rewritten Sad.
 Topic: How to write mod rewrite to another cname
How to write mod rewrite to another cname [message #4867] Wed, 14 September 2011 07:59
arazak  is currently offline arazak
Messages: 1
Registered: September 2011
Hi,

Previous my cname for 'www' was redirected to www.hotelscombined.com

And now, I have created another cname called 'hotel-budget-murah' directed to 'www.hotelscombined.com' and the cname for 'www' i have changed it to '@'

How i could rewrite the urls so that any urls that start with the following urls

http://www.carihotel.net/Country
http://www.carihotel.net/City

Are redirected to

http://hotel-budget-murah.carihotel.net/Country
http://hotel-budget-murah.carihotel.net/City

Thank you in advance for your help. Thanks

 Topic: catalog.php?page=shirt into /catalog/shirt
icon5.gif  catalog.php?page=shirt into /catalog/shirt [message #4747] Sat, 10 September 2011 09:43
mikemcleanuk  is currently offline mikemcleanuk
Messages: 1
Registered: September 2011
Hello i am interested in getting any requests for :

"domain.com/catalog/????" to actually be this in the background "domain.com/catalog.php?page=????"

where ???? is the catalog category

if domain.com/catalog/ is submitted without anything after the / then it is behind the scenes "domain.com/catalog.php"

finally if a script is submitted to catalog.php through a form i need it to display domain.com/catalog/???? not catalog.php

i have a rule that works for part of it but not all:

RewriteRule ^catalog/([^/]+) /catalog.php?page=$1 [NC]


/catalog/ returns a 404

submitting scripts which are php_self load catalog.php because i have no forward for catalog.php to /catalog/

any help appreciated

Mike
 Topic: Need help for redirect
Need help for redirect [message #4387] Tue, 06 September 2011 11:31
sinkronix  is currently offline sinkronix
Messages: 1
Registered: September 2011
Location: Romania
Hi there!

I have this htaccess file

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

# Redirect index.html to root
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://www.%{HTTP_HOST}/ [R=301,NS,L]

# Redirect index.php to root
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.%{HTTP_HOST}/ [R=301,NS,L]

RewriteRule ^([a-z][a-z])/index/?$ /index\.php?lang=$1 [QSA,L]
RewriteRule ^([a-z][a-z])/?$ /index\.php?lang=$1 [QSA,L]

RewriteRule ^index$ / [QSA,L]

Here is what I want:
http://mydomain.com/ point to root /
http://mydomain.com/index.php point to root /
http://mydomain.com/index.html point to root /

http://mydomain.com/index point to root /
http://mydomain.com/en point to index.php?lang=en

First three lines are fine.
But last two lines...
The strange thing: if I use anything two characters language variable (fr, it, es etc.) index.php file read it. Except "en", that is totally ignored. It works only if I manually add an extra slash - mydomain.com/en//

Please, help me! I realy need to use "en" for english version of the content.

 Topic: Redirecting PHP Product Pages
Redirecting PHP Product Pages [message #4188] Wed, 31 August 2011 14:21
dkelly85  is currently offline dkelly85
Messages: 1
Registered: August 2011
Location: United Kingdom
Hi, I hope you can help.

I'm trying to redirect some old product pages to the new versions of that page. From what I can gather a 301 redirect is the best way to do this.

I'm able to redirect static pages via Redirect 301. However the product pages are not static (PHP).

I've attempted to do rewriterule ^ - but I think I am writing it wrong. Is a rewriterule the best option or is there another way to do it?

Thanks

If you need specific examples please message back.
Thanks.

P.S- the page structure of the product pages is http://www.website.com/product_info.php?products_id=xxxx
 Topic: .htaccess with words separated by dash
.htaccess with words separated by dash [message #4186] Wed, 31 August 2011 13:47
dm07  is currently offline dm07
Messages: 1
Registered: August 2011
Hi all,

i have a problem getting the website htaccess below is the .htaccess code

Running on WampServer Version 2.0

# Follow symbolic links in this directory
Options +FollowSymLinks

# Set the default handler
#DirectoryIndex index.php

# URL rewrite rules
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   ## Category redirect
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule  ^([\w\-]+).html$ /index.php?seo_name=$1 [L]
   RewriteRule  ^map.xml$ /index.php?section=google_xml_map [L]
</IfModule>


I have some pages like:

http://localhost/company-profile.html
http://localhost/our-core-values.html
http://localhost/case-studies-main.html
For e.g
http://localhost/news.html
giving me
Not Found

The requested URL /news.html was not found on this server.

But when i hit this url it works
http://localhost/index.php?seo_name=news

Can you please rectify what i am missing, or whats wrong with the code.

Thanks
 Topic: redirecting all but gifs and jpegs
redirecting all but gifs and jpegs [message #4005] Thu, 25 August 2011 17:27
zr1skydiver  is currently offline zr1skydiver
Messages: 1
Registered: August 2011
I need to know how to redirect everything except .gif and .jpg to an index.php file. I am on a tight deadline and have no experience with .htaccess and have tried many things to no avail. Thanks in advance for your help.
 Topic: RewriteRule help
RewriteRule help [message #3267] Tue, 02 August 2011 13:45
strazdinjsh  is currently offline strazdinjsh
Messages: 2
Registered: July 2011
my one line of the code in .htaccess file is as follows:


RewriteRule ^andis-services/web-design/search-engine-optimization/page-( [^-]*)\.html$ index.php?m=1&s=3&p=$1 [L]


the link in simple php file looks like:


echo '<a href = " andis-services/web-design/search-engine-optimization/page-10 0.html ">test</a>';



the issue is that link does not target the same page all the time. after every click on it, i am getting redirection to:

2nd click goes to:

andis-services/web-design/search-engine-optimization/andis-s ervices/web-design/search-engine-optimization/page-100.html


3rd click goes to:

andis-services/web-design/search-engine-optimization/andis-s ervices/web-design/search-engine-optimization/andis-services /web-design/search-engine-optimization/page-100.html


etc.


Could anyone have a look on this case and give me some advice on it?
 Topic: rewrite
rewrite [message #3149] Tue, 26 July 2011 13:27
jonniejoejonson  is currently offline jonniejoejonson
Messages: 1
Registered: July 2011
The following rule works, but it changes the url in the address bar (I dont want it to)..
RewriteRule ^network/(.*)$ http://www.example.com/network.php?networkUrl=$1 [L]

The following rule redirects, the url stays the same, but all the images, includes in the network.php file become referenced incorrectly...
RewriteRule ^network/(.*)$ network.php?networkUrl=$1 [L]

Is there a way to make this work.
Thanks for your time...
Kind regards J
 Topic: rewrite help needed
rewrite help needed [message #3130] Mon, 25 July 2011 20:48
strazdinjsh  is currently offline strazdinjsh
Messages: 2
Registered: July 2011
Hello.

I am web developer newbie who creates the php class who converts the ugly look of the url to the friendly one. Result of the usage of this class is friendly url output and generated htaccess file with rules and conditions for particular urls.

Sample: I have some url who looks as follows:
index.php?a=1&b=2&c=3
, where any of these variables can have value {numbers, letters}. Variables values are collected from database tables.

a=1 => webtest_1
a=2 => webtest_2
...
a=x => webtest_x
-------------------------------
b=1 => photo_1
b=2 => photo_2
...
b=x => photo_x
--------------------------------
c=1 => pc_1
c=2 => pc_2
...
c=x => pc_x
--------------------------------
...
...
...
--------------------------------
z=1n => last_variable_1n
z=2n => last_variable_1n
...
z=xn => last_variable_xn



So, my htaccess contains something like:

Options +FollowSymlinks
RewriteEngine on

RewriteRule ^webtest_1/photo_2/pc_3\.html$ /index.php?a=1&b=2&c=3 [L]
RewriteRule ^webtest_2/photo_1/pc_1\.html$ /index.php?a=2&b=1&c=1 [L]
...
...
...


I have been done with this class so far - i am able to use it, only one disadvantage - lack of knowledge in htaccess coding. The htaccess file is huge and depends on the number of variables selected in url and number of rows assigned from the DB tables. I am looking for option to optimize it and speed up the loading of the web.

Could anyone advice and might be show how to use RewriteMap for my case. I have read a lot but have not got a solution for it.

Thank you in advance.
 Topic: htaccess mobile redirect
icon3.gif  htaccess mobile redirect [message #3112] Sun, 24 July 2011 18:35
terbush  is currently offline terbush
Messages: 1
Registered: July 2011
heyya....

STATS:
host = Godaddy w/linux
main dir structure = root (master index.html page and sub dirs)
sub dir structure = www.mysite.com/mobile/index.html

QUESTIONS:
so my main root folder has the index.html with heavy Flash. Google analytics is telling me that I am getting a lot of iOS and other mobile hits. BUT, the iOS is (obviously) not showing flash. so I want to redirect.

I can't figure out the code to put in the root .htaccess file
what I have tried ends up giving me a "too many redirects" errors.

current code:
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} iPhone|iPad|iTouch|iPod|palm||android
RewriteCond %{REQUEST_URI} !^/my-iPhone-site/
RewriteRule .* /mobile/ios/ [R]


I am looking to have the iphone, itouch, ipod go to one sub dir index page, ipad to another, and bb,palm,google-mobile etc etc go to another. AND have an option on the non iOS pages to have a "view full site" button that goes back to the root index.html page.


Thanks in advance for any assistance.
terbs
 Topic: Wordpress & osTicket
icon5.gif  Wordpress & osTicket [message #2990] Mon, 18 July 2011 14:46
JamesGeddes  is currently offline JamesGeddes
Messages: 1
Registered: July 2011
Location: London, England
Hi everyone,

I am working with a charity and have made a little internal tech support site at IUITHQ.co.cc using wordpress

In order to properly manage support requests, I have also installed osTicket at IUITHQ.co.cc/support however whenever I try to do anything within its "Staff Control Panel", wordpress wordpress kicks in and says that the page cannot be found!

I was wondering therefore, if you might be able to help me out with what .htaccess code I would need to use in order to stop wordpress from accessing the /support folder?

So far, I have this - which does not work!

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/support/.*$
RewriteCond %{REQUEST_URI} !^/support$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^index\.php$ - [L]
</IfModule>

# END WordPress


This is for a charity like I say so your help will be most gratefully appreciated!

Thanks everyone!

James

[Updated on: Mon, 18 July 2011 14:47]

Pages (28): [1  2  3  4  5  6  7  8  9  10  11  12  13  14  15    »]


Current Time: Thu May 17 07:46:25 CEST 2012

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software