Jump to content

DingDong

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by DingDong

  1. Could someone suggest hosting companies that support clean url - not shared servers may be VPS?
  2. I tried to add the slash as it is in root folder like this: RewriteRule ^test/(.*)$ /test.php?id=$1 [QSA,L] Still no luck. Same 404 error.
  3. My new hosting company needs server settings to display clean url. The htaccess code following does not work RewriteRule ^test/(.*)$ testitemnews.php?id=$1 [QSA,L] while this works with .php extension RewriteRule ^test.php/(.*)$ test.php?id=$1 [QSA,L] Could someone help me to figure out what server setting is wrong so I can ask them to change?
  4. I removed the slash and tried the code. It is still giving me 404 error. My code was working perfectly fine in a shared server and I want to migrate to different one. This hosting company says if I add extension to the file, it works. eg: RewriteRule ^test.php/(.*)$ test.php?id=$1 [QSA,L] It does work. But I want clean url and they are unable to help me as I do not what server setting is wrong or to be turned on. Any help?
  5. Yes, you're right. My goal is to have clean url with no php extension. I am migrating to a new server and the new server is not recognising the previous htaccess code I have been using(posted in my first posting) which did display clean url. But now, I am unable to figure out why the server does not recognize the masking of test.php. I am not getting help from my hosting company as they it is a coding issue. The server is on php 5.9. Is there any insight on why server does not recognize the htaccess masking without the .php extension? Or am I coding wrong?
  6. I figured that if I give .php extension to the file name, the htaccess, the my code and the code you sent works. But my problem remains as I am looking for clean url without .php. eg: <a href='http://00.00.00.000/~sitename/test.php/$id'>".$title."</a> The htaccess file is: <IfModule mod_rewrite.c> Options +Indexes Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d # RewriteCond %{REQUEST_FILENAME} !-f # RewriteRule ^test.php/(.*)\$ test.php?id=$1 [QSA,L] </IfModule>
  7. I am uable to pass query string variables through pretty URL in my test site which has the ip with tilda username URL (example: http://00.00.00.000/~sitename/testpage/$id). Can it be due to server settings, or the tilda in the URL? Execution gives me a 404 error. The url is displayed on the page as <a href='http://00.00.00.000/~sitename/testpage/$id'>".$title."</a> The htaccess file is: <IfModule mod_rewrite.c> Options +Indexes Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d # RewriteCond %{REQUEST_FILENAME} !-f # RewriteRule ^testitemnews/(.*)\$ test.php?id=$1 [QSA,L] </IfModule> I also tried the rewrite rule with # RewriteRule ^http://00.00.00.000/~sitename/testitemnews/(.*)\$ http://00.00.00.000/~sitename/testpage.php&id=$1 [QSA,L] Why is the page not displaying? I am really in a bad situation. Please help. The page displays if the url is not pretty with no htaccess code. What server setting should be changed or is it the code? The php server is 5.9 Thanks
  8. I am uable to pass query string variables through pretty URL in my test site which has the ip with tilda username URL (example: http://00.00.00.000/~sitename/testpage/$id). Can it be due to server settings, or the tilda in the URL? Execution gives me a 404 error. The url is displayed on the page as <a href='http://00.00.00.000/~sitename/testpage/$id'>".$title."</a> The htaccess file is: <IfModule mod_rewrite.c> Options +Indexes Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d # RewriteCond %{REQUEST_FILENAME} !-f # RewriteRule ^testitemnews/(.*)\$ test.php?id=$1 [QSA,L] </IfModule> I also tried the rewrite rule with # RewriteRule ^http://00.00.00.000/~sitename/testitemnews/(.*)\$ http://00.00.00.000/~sitename/testpage.php&id=$1 [QSA,L] Why is the page not displaying? I am really in a bad situation. Please help. The page displays with original url if it is not made pretty with htaccess code. What server setting should be changed or is it the code? The php server is 5.9 Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.