Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'htaccess'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 5 results

  1. Hello, I bought the new book version 2.0. I am now using the ex2 software testing. But the menus do not appear via htaccess. My htaccess is: <IfModule mod_rewrite.c> Options-MultiViews RewriteEngine on # For the primary categories: RewriteRule ^ shop / (coffee | goodies)? / Shop.php $ type = $ 1? # For sales: RewriteRule ^ shop / sales /? $ / Sales.php # For specific products: RewriteRule ^ browse / (coffee | goodies) / ([A-Za-z \ + \ -] +) / ([0-9] +) / $ browse.php type = $ 1 & category = $ 2 & id = $ 3? [edit] Yes Fixed. I have to change the menu in header html in shopon/shop/sales and it works [/edit] # For HTTPS pages: RewriteCond% {HTTPS} off RewriteRule ^ (\ checkout php |. Billing \ php |. Final \ php |. Admin / (*).) $ Https://% {HTTP_HOST} / $ 1 [R = 301, L] </ IfModule> Even with my ISP does not work. I work at home with xampp in localhost and the ISP in a sub folder test. Folder in localhost htdocs / shopon Anyone have an idea? Thanks and regards.
  2. I have my own website that I am trying to install clean search engine friendly urls on. I am doing this for the article page section of my site. I have it working except for a glitch. I am comparing my setup with that of this website and others which use htaccess clean urls. So basically I have my url which is like the following. http://stackoverflow.com/questions/9183130/php-htaccess-apply-page-title-in-url it works when I click on it and everything is fine. but if I take a part of the url like so: http://stackoverflow.com/questions/9183130/php-htaccess-apply-pag and refresh it still works which is ok. but the url doesn't return to the former one, it stays like that, missing part of the title in the url. I can't figure out how to make it revert back to the original url. All pages which seem to use clean urls have it working like that. here is my htaccess rule. and then I will show you the link I am using to link to the page. RewriteEngine On RewriteRule ^article/([0-9]+)/([a-zA-Z]+) article.php?id=$1&title=$2 $punctuation = array('$', '-', ',', '/', '\\', '!', '.', ' ', '*', '&', '?', '%', '\'', '<', '>', '[', ']', '(', ')'); $real_title = str_replace($punctuation, '-', $row5['title']); $real_title = str_replace(' ', '-', $real_title); $real_title = strtolower($real_title); $real_title = mysqli_real_escape_string($dbc, $real_title); <a href="http://www.example.com/article/'.$row5['article_id'].'/'.$real_title.'">'.$row5['title'].'</a>
  3. My htaccess file works except the Redirects. They used to work. sickle cell anemia is the one I added yesterday and it doesn't work. back pain and heartburn used to work but now they don't. sleep disorders and hemophilia are also in my cpanel Redirect and they work from there and are not really needed here. But I don't want to do it through cpanel and I shouldn't have to. Can you find what is wrong with my code? Here is my entire htaccess file: ErrorDocument 404 /404.shtml ErrorDocument 400 /400.shtml ErrorDocument 401 /401.shtml ErrorDocument 403 /403.shtml ErrorDocument 500 /500.shtml # this is to handle the 301s because I moved my files or renamed them <IfModule mod_rewrite.c> RewriteEngine On # # Following is because linkback from: #ningxiebayinzi.com/unique-hemophilia-treatment-fixes-your-illness-prevents-hemophilia Redirect 301 /hemophilia-treatment /unique/hemophilia-treatment # # Following is because linkback from: #solutionssnoring.org/brussels-griffon-snoring/ #solutionssnoring.org/ayurvedic-treatment-for-sleep-disorder/ #solutionssnoring.org/category/1/page/3/ Redirect 301 /sleep-disorders-treatment.php /unique/sleep-disorders-treatment # # Following is renaming by canonical when in home so .php needs to be specified #Redirect 301 /sickle-cell-anemia-treatment /sickle-cell-anemia-treatment.php #Redirect 301 /back-pain-treatment /back-pain-treatment.php #Redirect 301 /hiccups-heartburn-treatment /hiccups-heartburn-treatment.php </IfModule>
  4. hi.. everyone.. I need to rewrite this URL http://localhost/lanka_institute/profiles/tutors/index.php?tutorCode=1255&tutorName=Kasun%20Perera&city=Bandarawela like this http://www.mydomain.com/profiles/tutors/1255/Kasun+Perera.html I tried this with Apache’s mod_rewrite feature. But I couldn't reach to my expecting result. Here is Code that I have tried. <IfModule mod_rewrite.c> RewriteEngine on # For specific teachers: RewriteRule ^localhost/lanka_institute/profiles/tutors/([0-9]+)/([A-Za-z\+\-]+)/([A-Za-z\+\-]+)/$ index.php?tutorCode=$1&tutorName=$2&city=$3 </IfModule> It is not working and then I can get this error message. any comments are greatly appreciated. Thank you.
  5. Hello everyone, My boss has two websites -- one of which they wanted me to clone to replace the other. They are on two different servers. They had me transfer the website files, reconfigure to a new database on a new server, and then make cosmetic changes. However, I am finding that none of the links on the clone (apart from the home page) actually work. For instance, if you click "What's New" this should link to the Who We Are page. The URL it links to is: /who-we-are (without any php extension). There is a .php file on public_html that is titled "who-we-are.php." The absence of an extension in the URL made me think there was an .htaccess file, and there was: [/color][/color][/font][/size] Options -MultiViews Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)$ $1.php [L,QSA] RewriteRule ^search([\/]?)$ index.php?option=collection-products&section=collection&%{QUERY_STRING} [L,QSA] RewriteRule ^page\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=pages&url=$1&%{QUERY_STRING} [L,QSA] RewriteRule ^product\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=product&category=$1&producturl=$2&%{QUERY_STRING} [L,QSA] RewriteRule ^products\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=collection-products&section=collection&productcat=$1&%{QUERY_STRING} [L,QSA] RewriteRule ^products\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=collection-products&section=collection&category=$1&productcat=$2&%{QUERY_STRING} [L,QSA] RewriteRule ^products\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=collection-products&category=$1&section=collection&subcategory=$2&productcat=$3&%{QUERY_STRING} [L,QSA] RewriteRule ^collection\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=collection&section=collection&category=$1&%{QUERY_STRING} [L,QSA] RewriteRule ^collection\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=collection&section=collection&category=$1&subcategory=$2&%{QUERY_STRING} [L,QSA] #RewriteRule ^detail\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=cat_page_more&section=$1&category=$2&%{QUERY_STRING} [L,QSA] #RewriteRule ^philanthropy([\/]?)$ index.php?option=our-work&section=philanthropy&&%{QUERY_STRING} [L,QSA] RewriteRule ^philanthropy\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=cat_pages&section=philanthropy&category=$1&%{QUERY_STRING} [L,QSA] RewriteRule ^philanthropy\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=cat_page_detail&section=philanthropy&category=$1&pageurl=$2&%{QUERY_STRING} [L,QSA] RewriteRule ^our-work\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=cat_pages&section=our-work&category=$1&%{QUERY_STRING} [L,QSA] RewriteRule ^our-work\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=cat_page_detail&section=our-work&category=$1&pageurl=$2&%{QUERY_STRING} [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=cat_page_detail&section=$1&pageurl=$2&%{QUERY_STRING} [L,QSA] RewriteRule ^our-services([\/]?)$ index.php?option=cat_pages&section=our-services&%{QUERY_STRING} [L,QSA] #RewriteRule ^philanthropy([\/]?)$ index.php?option=cat_pages&section=philanthropy&%{QUERY_STRING} [L,QSA] RewriteRule ^conceptual-gift-design([\/]?)$ index.php?option=cat_pages&section=conceptual-gift-design&%{QUERY_STRING} [L,QSA] #RewriteRule ^our-services\/([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=cat_page_detail&section=our-services&pageurl=$1&%{QUERY_STRING} [L,QSA] #RewriteRule ^our-work([\/]?)$ index.php?option=collection&section=our-work&%{QUERY_STRING} [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)([\/]?)$ index.php?option=$1&%{QUERY_STRING} [L,QSA] It references a symlink. On the original website, there are two symlinks in the root/ folder (not public_html) that are titled: www -> public_html; and then another called, access_logs -> ../domlogs/artmorp1. I assume I need to add the symlinks to the new server for the new site, but can anyone help me understand what is actually going on in this situation? It would help if you could point out what the problem with the clone, and give me suggestions as to how to fix it. Many thanks.
×
×
  • Create New...